POST #019
=======================================================================
This is the 1st part of the mini-video about uniGUI. Developing a stateful Rich Internet
Application (RIA) is one of the challenging fields in software
development. uniGUI Web
application framework makes developing
stateful Web applications easier than ever.
uniGUI extends Web
Application development experience to a new dimension. In my little experiment, I'm using uniGUI with DataSnap.
uniGUI with DataSnap seems to be a good match.
DataSnap architecture is more flexible than before. It moves the
connection between the client applications and database server to
application server and database server while you can connect many
client applications to the same application server.
Tags: RIA with Delphi; unigui; DataSnap with uniGUI; unigui web application.
POST #018
=======================================================================
You can create web applications RIA (Rich Internet Application) without the need for many specific knowledge for web environment, such as HTML, javascript, CSS, PHP, etc.
You can use the same code base object pascal to create a desktop app and a win32 VCL application RIA web quickly and very easily.
If you do not know, uniGUI is an alternative for developing RIA web applications using 100% AJAX features of the Delphi RAD environment. In uniGUI, most of the business logic, as well as the complexity of threads, managing multi-user access and all data is located in a central layer, running on the server.
You can freely download uniGUI beta, for testing. But if you intend to use it to publish a web application or even a commercial application freeware, closed source, the developer will have to purchase a full license of ExtJS, which costs about US$330. Any uniGUI server requires a copy of the ExtJS library. Due to its licensing scheme, I think even freeware closed source applications are unable to use it. According to the roadmap uniGUI, from version 1.0, it is likely that uniGUI be marketed - in 2013, and the license price will be the "style" of the Sencha ExtJS, around US$330 per developer, ie, to use uniGUI, developer should spend approximately R$1.200,00 (BR).
I was wondering about using mORMot together uniGUI. In uniGUI, since all server-centered activity is hosted in one multi-thread process. Perhaps, make sense to use a local SQLite database engine. I'd like to use SQLite3 as a client-server where the same database will be accessed simultaneously by many clients/threads, accessing a common database. Interesting, isn't it?
Typically in uniGUI, if you want to show records from your database table on a DBGrid in your application, you will need:
1. TSQLConnection to provide the necessary connection details to the database. One TSQLConnection can service several TSQLDatasets.
2. A TSQLDataset component which will specify the TSQLConnection component in the SQLConnection property.
3. A TDatasetProvider component which will specify the TSQLDataset in its Dataset property.
4. A TClientDataset component which will specify the TDatasetProvider in its ProviderName property
5. A TDataSource component which will specify the TClientDataset component in its Dataset property.
A TDBGrid component which will specify the TDataSource in its DataSource property.
By setting the appropriate Active properties to true in TSQLConnection, TSQLDataset and TClientDataset you should find that the data will appear in the grid. __________ I skipped steps 1-2 to simply display data in a DBGrid, for me, the easiest way to edit/delete/insert any of the cell values in a DBGrid with mORMOt and write back do database is using TClientDataSet. On BeforeApplyUpdates event I could capture delta, and put Delta back to to the database using Batch sequences. TDatasetProvider here is like a pipe connecting TClientDataset with TSQLTableJSON. It seems like quite a bit of effort to simply display and modify records in a DBGrid, but that is the way it works!
Yep, this is like bizarre creatures from another planet.
Tags: RIA with Delphi; unigui; mORMOt with uniGUI; unigui web application.
POST #017
=======================================================================
Remember that old demo well known "FishFacts" developed with Delphi win32 that displays a list of fishes, as well fishes images and notes text BLOBS from a paradox dataset Biolife. Old days...
Now, I’m using mORMot, with a background HTTP REST server, together with its SQLite3 database engine. I’ve implemented a thin client, Ajax-ready, open and lightweight javascript client using jQuery, that shows how to display style memo and graphic fields. This app has been compiled with Delphi 7, but you can recompile it with Delphi 2009/2010/XE.
Tags: Delphi with jQuery; Delphi REST server; Delphi mORMOt with thin client.
POST #016
=======================================================================
Rather than just dabbling around a handful of jqGrid demos examples, I recently spent a few hours building a quite simplistic project using jqGrid with mORMot. I found that functionalities like "remote paging", "remote sorting" and "remote multi-searching" are working fine.
Remote paging is fine but I would like the grid will automatically postback to the server when end-users select a row and will fire the RowSelecting event handler and databind a second grid with details. I have tested more complex events, such as a subgrid. It's so fast and beautiful.
I had to use boils down (to do a MacGyver) to handle master detail and subgrid with mORMot with jqGrid. Technically everything goes pretty well.
Tags: Remote Filtering with jqGrid and Delphi; jqGrid with Delphi mORMot; Master detail grid with jqGrid and Delphi mORMot; subgrid with jqGrid and Delphi mORMot;Delphi Restful.
POST #015
========================================================================
In this mini-video, a remote RESTful access of a SQLite3 database, hosted by a mORMot server, with this dedicated server it was possible to do remote paging and remote sorting as well as CRUD operations with the ExtJS Grid.
Recently I was playing with mORMot and ExtJS when I came across a major block, the solution of which I now wish to share through this tip.
While working with ExtJS at Client side and JSON objects returned on the server side (here mORMot), I found that all functionalities were working fine except remote filtering. It is quite well-known that mORMot supports sorting as well as paging.
Please note:
=========
- the docked pagination toolbar at the bottom of the screen.
- the results are sorted by Name in ascending / descending order.
- the pagination and sorting is being done remotely at server side.
- Filtering: has been done LOCALLY at client side.
- Table SampleRecord has 52,500 records
Best regards,
warleyalex from Sete Lagoas, Brazil
Tags: Remote Paging; Remote Sorting; ExtJS with Delphi; Remote Paginator; CRUD with Delphi and ExtJS; Extjs with mORMot;
POST #014
=======================================================================
Sometimes, you only need a specific subset of data from your dataset, but you need it filtered to a specific set of Records. After working with our filtered dataset, there will come a time when we want our original dataset back. When we filtered the dataset, the other Records didn't go away. They're still sitting in cache, to the side, waiting to be recalled. Rather than query the server again, we can simply clear our filter.
Client-side filtering is great, reducing our trips to the server. Sometimes, however, our record set is just too large to pull in at once. A great example of this is a paging grid. Many times we'll only be pulling in 10 Records at a time. The client-side filtering methods just are fine if we only want to filter the resident dataset, but most of the time we'll want a filter applied to all of our data.
Sorting data on remote calls is pretty easy, using Extjs, as we can set the property remoteSort to true (default value is false) and the proxy will pass the filter object as the parameter:
filter:[{"property":"subject","value":"mORMot"}].
So, basically if our Store was attached to a grid object, clicking on a column heading to sort the display would automatically pass the parameter value in its AJAX request, and our little server mORMot should be well enough to handle these request.
Filtering data on remote requests is a bit harder. We would pass parameters through the Store's load event, and act on those arguments in our mORMot server-side method. Our little mORMot should read the parameter filter (a json object) and perform the filtering on server side. The problem is: our mORMot uses another approach to filter data – it uses inlined parameters via SQLwhere and cannot read directly with parameter Filter coming from the client side.
This might look complicated, but it really isn't! Again, our mission here is to learn how mORMot handle with this task, it is important to have some understanding of what your server-side process is doing. The trick is: what we have to do here is just passing some expected parameters related to filtering using inlined aproach through HTTP request, mORMot will just ignore the option parameter filter.
Regards,
warleyalex from Sete Lagoas, Brazil
Tags: Remote Filtering with ExtJS; Remote ComboBox Filtering with Extjs; ExtJS with Delphi mORMot; remote Filter with Extjs and Delphi;