Skip to content

Commit 7e34bd3

Browse files
committed
update docs
1 parent 43b74a1 commit 7e34bd3

27 files changed

+220
-264
lines changed

src/app/console/start/start.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h3>Create Console Project</h3>
1818
<p>
1919
Or, using the composer command-line:
2020
</p>
21-
<pre><code class="language-shell">composer create-project devnet/console-template project-name</code></pre>
21+
<pre><code class="language-shell">composer create-project devnet/console project-name</code></pre>
2222
<br>
2323
<h4>Project Structure</h4>
2424
<p>

src/app/core/linq/linq.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1>Language Integrated Query</h1>
1414
Any collection class of type <code>IEnumerable</code> or <code>IQueryable</code> that uses the <code>DevNet\System\MethodTrait</code> to support the extension method can take advantage of using LINQ extension methods.
1515
</p>
1616
<p>
17-
The difference between <code>IEnumerable</code> and <code>IQueryable</code> types is that the implementation of the <code>IEnumerable</code> type, like the <code>ArrayList</code>, uses LINQ against in-memory data, while the implementation of the <code>IQueryable</code> type, like the <code>EntitySet</code> repository of DevNet Entity ORM, uses LINQ against SQL database, which means that this one uses <code>IQueryProvider</code> to compile the predicate expressions of the LINQ methods to SQL query syntax.
17+
The difference between <code>IEnumerable</code> and <code>IQueryable</code> types is that the implementation of the <code>IEnumerable</code> type, like the <code>ArrayList</code>, uses LINQ against in-memory data, while the implementation of the <code>IQueryable</code> type, like the <code>EntitySet</code> repository of DevNet DevNet ORM, uses LINQ against SQL database, which means that this one uses <code>IQueryProvider</code> to compile the predicate expressions of the LINQ methods to SQL query syntax.
1818
</p>
1919
<h3>Using LINQ extension methods</h3>
2020
<p>

src/app/core/overview/overview.component.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h1>Overview</h1>
99
<hr>
1010
<p>
11-
DevNet Core is the heart of the DevNet framework, and all of its components rely on it. It is a base class library that provides several fundamental features that make it easier to develop applications in PHP. These features include:
11+
DevNet System is a low-level library that provides the fundamental functionalities of the DevNet framework, which can be represented in the following features:
1212
</p>
1313
<ul>
1414
<li>Accessor Properties</li>
@@ -17,14 +17,15 @@ <h1>Overview</h1>
1717
<li>Generic Types</li>
1818
<li>Asynchronous Operations</li>
1919
<li>Delegates & Events</li>
20+
<li>Database Access</li>
2021
<li>And more...</li>
2122
</ul>
2223
<br>
2324
<h3>Installation</h3>
2425
<p>
25-
If you have installed any of the DevNet packages in your system or project, then you already have the DevNet Core. However, you can still install DevNet Core as a third-party library to work with any PHP project by running the following command in the terminal using composer:
26+
If you have installed any of the DevNet packages, then you already have the DevNet System. However, you can still install DevNet System as a third-party library to work with any PHP project by running the following composer command-line:
2627
</p>
27-
<pre><code class="language-shell">composer require devnet/core</code></pre>
28+
<pre><code class="language-shell">composer require devnet/system</code></pre>
2829
</article>
2930
<nav class="no-print" aria-label="Page navigation">
3031
<ul class="nav-page">

src/app/docs/docs.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h5 class="card-title">Security</h5>
5454
<div class="col-sm-6 col-md-4 mb-3">
5555
<div class="card shadow-sm h-100 p-3">
5656
<div class="card-body">
57-
<h5 class="card-title">Entity ORM</h5>
57+
<h5 class="card-title">ORM</h5>
5858
<p class="card-text mb-0">Manipulating the database using the object relational mapper</p>
5959
<a class="card-link stretched-link" routerLink="/docs/entity"></a>
6060
</div>

src/app/entity/migrations/migrations.component.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ <h3>Creating a migration</h3>
2626

2727
namespace Application\Migrations;
2828

29-
use DevNet\Entity\Migrations\Migration;
30-
use DevNet\Entity\Migrations\MigrationBuilder;
29+
use DevNet\ORM\Migrations\Migration;
30+
use DevNet\ORM\Migrations\MigrationBuilder;
3131

3232
class InitialMigration extends Migration
3333
&lcub;
@@ -64,8 +64,8 @@ <h4>Creating the database Schema</h4>
6464

6565
namespace Application\Migrations;
6666

67-
use DevNet\Entity\Migrations\Migration;
68-
use DevNet\Entity\Migrations\MigrationBuilder;
67+
use DevNet\ORM\Migrations\Migration;
68+
use DevNet\ORM\Migrations\MigrationBuilder;
6969

7070
class InitialMigration extends Migration
7171
&lcub;
@@ -128,8 +128,8 @@ <h4>Updating the database schema</h4>
128128

129129
namespace Application\Migrations;
130130

131-
use DevNet\Entity\Migrations\Migration;
132-
use DevNet\Entity\Migrations\MigrationBuilder;
131+
use DevNet\ORM\Migrations\Migration;
132+
use DevNet\ORM\Migrations\MigrationBuilder;
133133

134134
class AlterMigration extends Migration
135135
&lcub;
@@ -174,8 +174,8 @@ <h4>Seeding the database</h4>
174174

175175
namespace Application\Migrations;
176176

177-
use DevNet\Entity\Migrations\Migration;
178-
use DevNet\Entity\Migrations\MigrationBuilder;
177+
use DevNet\ORM\Migrations\Migration;
178+
use DevNet\ORM\Migrations\MigrationBuilder;
179179

180180
class SeedMigration extends Migration
181181
&lcub;

src/app/entity/query/query.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ <h4>Partitioning Data</h4>
102102
<br>
103103
<h5>Pagination Example</h5>
104104
<p>
105-
You can implement data pagination in Entity ORM using the LINQ methods <code>skip()</code> and <code>take()</code> like this:
105+
You can implement data pagination in DevNet ORM using the LINQ methods <code>skip()</code> and <code>take()</code> like this:
106106
</p>
107107
<pre><code class="language-php">$page = 1; // The page number you want to retrieve.
108108
$size = 10; // The number of items per page.

src/app/entity/relationships/relationships.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h3>Navigation property:</h3>
2020
</p>
2121
<ul>
2222
<li class="mb-2"><b>Collection navigation property:</b> is a property that contains references to multiple related entities, used to navigate through one-to-many and many-to-many relationships, defined by the type <code>DevNet\System\Collections\ICollection</code> with the annotation <code>DevNet\System\Generic</code> which specifies the type of the related entity collection.</li>
23-
<li class="mb-2"><b>Reference navigation property:</b> is a property that contains a reference to a single related entity, used to navigate through one-to-one and many-to-one relationships, has the same type as the type of the related entity, and may have the annotation <code>DevNet\Entity\Annotations\ForeignKey</code> to define the name of the property that is used as a foreign key in the dependent entity.</li>
23+
<li class="mb-2"><b>Reference navigation property:</b> is a property that contains a reference to a single related entity, used to navigate through one-to-one and many-to-one relationships, has the same type as the type of the related entity, and may have the annotation <code>DevNet\ORM\Annotations\ForeignKey</code> to define the name of the property that is used as a foreign key in the dependent entity.</li>
2424
</ul>
2525
<p>
2626
The example below demonstrates an entity class named <code>Post</code> that has two navigation properties: a reference property called <code>Post::User</code>, and a collection property called <code>Post::Classifications</code>.
@@ -29,7 +29,7 @@ <h3>Navigation property:</h3>
2929

3030
namespace Application\Models;
3131

32-
use DevNet\Entity\Annotations\ForeignKey;
32+
use DevNet\ORM\Annotations\ForeignKey;
3333
use DevNet\System\Collections\ICollection;
3434
use DevNet\System\Type;
3535
use DateTime;
@@ -102,7 +102,7 @@ <h3>One to one</h3>
102102

103103
namespace Application\Models;
104104

105-
use DevNet\Entity\Annotations\ForeignKey;
105+
use DevNet\ORM\Annotations\ForeignKey;
106106

107107
class Profile
108108
&lcub;
@@ -163,7 +163,7 @@ <h3>Many to Many</h3>
163163

164164
namespace Application\Models;
165165

166-
use DevNet\Entity\Annotations\ForeignKey;
166+
use DevNet\ORM\Annotations\ForeignKey;
167167

168168
#[PrimaryKey('PostId', 'CategoryId')]
169169
class Classification

src/app/entity/start/start.component.html

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
<h1>Get Started</h1>
99
<hr>
1010
<p>
11-
Entity ORM (Object-relational Mapping) is a system that offers an automated mechanism to developers for accessing and storing the data in the database in an object-oriented way, by performing the work required to map between Entities defined in an application's programming language as classes and data stored in relational data sources as tables, without needing the data-access code to be written.
11+
DevNet ORM (Object-relational Mapping) is a system that offers an automated mechanism to developers for accessing and storing the data in the database in an object-oriented way, by performing the work required to map between Entities defined in an application's programming language as classes and data stored in relational data sources as tables, without needing the data-access code to be written.
1212
</p>
1313
<p>
14-
The following diagram is an abstraction of Entity ORM architecture.
14+
The following diagram is an abstraction of DevNet ORM architecture.
1515
</p>
1616
<img src="assets/images/orm.svg" width="100%" height="auto">
1717
<br><br>
@@ -32,25 +32,25 @@ <h1>Get Started</h1>
3232
<br>
3333
<h3>Installation</h3>
3434
<p>
35-
If the DevNet framework is not fully installed, you can install the Entity ORM package into your project using Composer by running the following command in your terminal:
35+
If the DevNet framework is not fully installed, you can install the DevNet ORM package into your project using Composer by running the following command in your terminal:
3636
</p>
3737
<pre><code class="language-shell">composer require devnet/entity</code></pre>
3838
<br>
3939
<h3>Defining the EntityContext</h3>
4040
<p>
41-
The recommended way to work with Entity ORM is to define a context class in the <b>"Models"</b> folder that derives from <code>DevNet\Entity\EntityContext</code> and exposes <code>DevNet\Entity\EntitySet</code> properties that represent collections of the specified entities in the context, as shown in the following example.
41+
The recommended way to work with DevNet ORM is to define a context class in the <b>"Models"</b> folder that derives from <code>DevNet\ORM\EntityContext</code> and exposes <code>DevNet\ORM\EntitySet</code> properties that represent collections of the specified entities in the context, as shown in the following example.
4242
</p>
4343
<pre><code class="language-php">&lt;?php
4444

4545
namespace Application\Models;
4646

47-
use DevNet\Entity\EntityContext;
48-
use DevNet\Entity\EntityOptions;
49-
use DevNet\Entity\EntitySet;
47+
use DevNet\ORM\EntityContext;
48+
use DevNet\ORM\EntityOptions;
49+
use DevNet\ORM\EntitySet;
5050

5151
class BlogContext extends EntityContext
5252
&lcub;
53-
public readonly EntitySet $Posts;
53+
public EntitySet $Posts;
5454

5555
public function __construct(EntityOptions $options)
5656
&lcub;
@@ -105,9 +105,9 @@ <h4>Data annotations</h4>
105105

106106
namespace Application\Models;
107107

108-
use DevNet\Entity\Annotations\Column;
109-
use DevNet\Entity\Annotations\Primarykey;
110-
use DevNet\Entity\Annotations\Table;
108+
use DevNet\ORM\Annotations\Column;
109+
use DevNet\ORM\Annotations\Primarykey;
110+
use DevNet\ORM\Annotations\Table;
111111
use DateTime;
112112

113113
#[Table('Posts')]
@@ -133,13 +133,13 @@ <h4>Data annotations</h4>
133133
<br>
134134
<h3>Connecting to the Database</h3>
135135
<p>
136-
The simplest way to connect Entity ORM to the database, is by creating an instance of the derived class of <code>EntityContext</code>, and passing the database configuration options to the constructor as follows:
136+
The simplest way to connect DevNet ORM to the database, is by creating an instance of the derived class of <code>EntityContext</code>, and passing the database configuration options to the constructor as follows:
137137
</p>
138138
<pre><code class="language-php">&lt;?php
139139

140140
use Application\Models\BlogContext;
141-
use DevNet\Entity\EntityOptions;
142-
use DevNet\Entity\Sqlite\SqliteDataProvider;
141+
use DevNet\ORM\EntityOptions;
142+
use DevNet\ORM\Sqlite\SqliteDataProvider;
143143

144144
$options = new EntityOptions();
145145
$options->ProviderType = SqliteDataProvider::class;
@@ -151,7 +151,7 @@ <h3>Connecting to the Database</h3>
151151
<br>
152152
<h4>Database Providers</h4>
153153
<p>
154-
The following table shows a list of database providers that are supported by Entity ORM.
154+
The following table shows a list of database providers that are supported by DevNet ORM.
155155
</p>
156156
<table class="table">
157157
<thead>
@@ -162,15 +162,15 @@ <h4>Database Providers</h4>
162162
</thead>
163163
<tbody>
164164
<tr>
165-
<td><code>DevNet\Entity\MySql\MySqlDataProvider</code></td>
165+
<td><code>DevNet\ORM\MySql\MySqlDataProvider</code></td>
166166
<td>MySql</td>
167167
</tr>
168168
<tr>
169-
<td><code>DevNet\Entity\PgSql\PgSqlDataProvider</code></td>
169+
<td><code>DevNet\ORM\PgSql\PgSqlDataProvider</code></td>
170170
<td>PostgreSql</td>
171171
</tr>
172172
<tr>
173-
<td><code>DevNet\Entity\Sqlite\SqliteDataProvider</code></td>
173+
<td><code>DevNet\ORM\Sqlite\SqliteDataProvider</code></td>
174174
<td>SQLite</td>
175175
</tr>
176176
</tbody>
@@ -187,16 +187,16 @@ <h4>Connection String</h4>
187187
<br>
188188
<h3>Registering the EntityContext</h3>
189189
<p>
190-
It is recommended that you register the Entity ORM as a reusable service to be injected into your application using the <code>ServiceCollectionExtensions::addEntityContext()</code> Extension method, which is called within the <code>WebHostBuilder::register()</code> method, with the use of the configuration provider that gets the database configuration from the <samp>"settings.json"</samp> file as shown in the following code example:
190+
It is recommended that you register the DevNet ORM as a reusable service to be injected into your application using the <code>ServiceCollectionExtensions::addEntityContext()</code> Extension method, which is called within the <code>WebHostBuilder::register()</code> method, with the use of the configuration provider that gets the database configuration from the <samp>"settings.json"</samp> file as shown in the following code example:
191191
</p>
192192
<pre><code class="language-php">&lt;?php
193193

194194
namespace Application;
195195

196196
use Application\Models\BlogContext;
197-
use DevNet\Web\Hosting\WebHost;
198-
use DevNet\Web\Extensions\ApplicationBuilderExtensions;
199-
use DevNet\Web\Extensions\ServiceCollectionExtensions;
197+
use DevNet\Core\Hosting\WebHost;
198+
use DevNet\Core\Extensions\ApplicationBuilderExtensions;
199+
use DevNet\Core\Extensions\ServiceCollectionExtensions;
200200

201201
class Program
202202
&lcub;
@@ -232,9 +232,9 @@ <h3>Registering the EntityContext</h3>
232232

233233
namespace Application\Controllers;
234234

235-
use DevNet\Web\Endpoint\Controller;
236-
use DevNet\Web\Endpoint\IActionResult;
237-
use DevNet\Web\Endpoint\Route;
235+
use DevNet\Core\Endpoint\Controller;
236+
use DevNet\Core\Endpoint\IActionResult;
237+
use DevNet\Core\Endpoint\Route;
238238
use Application\Models\BlogContext;
239239

240240
class BlogController extends Controller

0 commit comments

Comments
 (0)