QLight
+- QLight.Service (A)
+- QLight (A.1)
+- Controllers (A.1.1)
+- Models (A.1.2)
+- Dom (A.1.3)
+- SQL (A.1.3.1)
+- QLight.Test (A.2)
+- qlanir.app (B)
+- public (B.1)
+- ural (B.1.1)
+- app (B.1.2)
+- controllers (B.1.2)
+- views (B.1.3)
+- vm (B.1.4)
+- assets (B.1.5)
DataService (ASP MVC Project) and Tests, C#
DataService - ASP MVC Project, access to resources implemented via Web API Controllers
Database - SQL server, project uses code first entity framework model (DevArt)
Web API controllers, provide RESTFull interfaces, to access data. Each resource has own controller, each controller implements 5 CRUD actions:
- GetAll - retrieve all items (/reource [GET])
- GetOne - retive single item (/reource/id [GET])
- Create - create new item (/reource [POST])
- Update - update item (/reource [PUT])
- Delete - delete item (/reource/id [DELETE])
Modles which represent resources
CRUD interfaces to work with resources
Basically provide 5 CRUD operations, GetAll, GetOne, Create, Update, Delete, which in turn are used by controllers (A.1.2).
Implementation of interfaces from A.1.3, for particular data source in this case for entity framework model.
Tests for A.1.
Interfaces from A.1.3 injected to controllers via Ninject, see file NinjectModules/SqlDataContextModule.cs (defines which interface to which implementation bind). This way each controller has own interface via which it could execute CRUD operation on particular resource.
Web application, UI. Client is based on Single Page Application Framewrok - Ural. Server is nodejs server which just serves static assets (html, js, etc)
No views are generated on server side, all data passed through service (A) and client (browser) generate user interface view on the fly.
Static assets for web client.
Single Page Application framework external link here
Web application itself, based on ural framework (B.1.1)
Controller get requests, load data for these requests and generate views on the base of the loaded data, for each particular resource
Knockoutjs html templates, controller loads particular data, then these data are bound to particular template via knockout binding.
view model of particular resources, represnt knockout view models, also responsible for dispatching resource CRUD opartions to the data service, typically via data provider (see ural framework docs)
Static html assets: css, images, also 3d party libraries libraries which are used by application and ural framework (they considered global for application, for examle requirejs, knockoutjs, etc).