You are not logged in.
@ab
Your framework allows for very (very) easy and elegant persistence. Thanks for that.
However, the users demand mobile access.
For Android: do-able with Delphi and/or FPC.
For Apple not that easy.
But the web is there. And Smart Mobile Studio (SMS) offers Pascal for the Web.
SMS looks very promissing. But its closed source.
Its development stalls, due to lack of time/money/drive ?!
The forum is quite.
I would like to hear your opinion about web-access of your REST servers.
What would be the best way to go.
And with best I mean a direction that will be ok for the next couple of years (3-5).
I tried the SLIM framework. Tried SMS. Tried some of the Samples you provide.
Thanks !
ps:
your SMS samples do not compile anymore with the latest SMS on my systems ... can you reproduce ?
Offline
I still use SMS for my own projects, since
- I have some code which compiles and run with Delphi, FPC and SMS: I can debug the logic on Windows, then it works on SMS almost everytime;
- I'm able to deploy applications on Android and iPhone (and any other system) as HTML5 app, by-passing the iTunes/GooglePlay stores.
- And they still run offline.
IMHO those are a huge benefit.
I would never use a PHP framework.
But SMS is not actively developed...
What I mostly use is their compiler, and Chrome debugger.
So it does not matter much to me.
For the UI, the Smart components are too few... I am currently using the CSS part of Ionic, which renders very well. See http://ionicframework.com/docs/components
Offline
Does anybody try to use Elevate Web Builder?
Offline
I tried, but the language was not at the same level, it was focusing on DB/RAD apps, and the UI was - at least at this time - targeting desktop applications, not mobile applications.
Now there are some responsive design abilities...
And EWB seems more supported than SMS, and did change a lot from the begining. The 2nd has indeed a disappointing very slow change rate.
I may try EWB once more.
Offline
And OpenUI5 ? the enterarse Daesh opten Sucre Project firm SAP http://openui5.org
Esteban
Offline
@EMartin
OpenUI5 ... never heard of ... just tried it with Sample 4 ... tooks some minutes, but not many ... works ... and looks great !!
Do you have more experience with it ?
Offline
Not yet, but will use it.
Esteban
Offline
You can use Smart Mobile Studio basic version and connect to the mORMot server, which generates wrapper class ready to be used.
· Handle authentication/security and
· Perform all the CRUD operations (delete, update, add and get) with ORM records.
With SMS Basic version, you can not use the visual components library, layouts, but you can build HTML5/CSS3 views manually - you can use mORMot wrapper generated classes! For instance, you can use CSS parts of ionics to create responsive views.
You can use the smart mobile studio command-line compiler (SMSC.EXE), to compile smart pascal to javascript. However, since this tool is available for free it is not allowed to redistribute for money, you can not sell a product that contains the command line compiler.
Offline
The enterprise ready feature of OpenUI5 that include datagrid (not all web frameworks has it) is superior, for me, to others frameworks.
Esteban
Offline
your SMS samples do not compile anymore with the latest SMS on my systems ... can you reproduce ?
I suppose you are talking about webform project. Indeed, SMS 2.2.0.4165 have some issues related to exported forms.
Please open WebForm.sproj with an external text editor and copy-paste this.
Now you can compile this project on both 2.1.2.3592 and 2.2.0.4165 versions.
<SMART>
<Project version="2" subversion="1">
<Name>WebForm</Name>
<Created>T00:00:00.000</Created>
<Modified>2015-10-16T19:03:27.953</Modified>
<Author>A. Bouchez</Author>
<Company>Synopse</Company>
<Version>
<Major>1</Major>
<Minor>18</Minor>
<Revision>0</Revision>
</Version>
<Apple>
<FormatDetection>1</FormatDetection>
<StatusBarStyle>default</StatusBarStyle>
<WebAppCapable>1</WebAppCapable>
</Apple>
<Options>
<PostBuild>
<Enabled>0</Enabled>
<Script>//CopyFile('.\www\index.html','.\www\debug\index.html',true);</Script>
</PostBuild>
<Compiler>
<Assertions>1</Assertions>
<Optimize>1</Optimize>
<HintsLevel>1</HintsLevel>
</Compiler>
<Codegen>
<Obfuscation>0</Obfuscation>
<RangeChecking>0</RangeChecking>
<InstanceChecking>0</InstanceChecking>
<ConditionChecking>1</ConditionChecking>
<LoopChecking>1</LoopChecking>
<InlineMagics>1</InlineMagics>
<EmitSourceLocation>1</EmitSourceLocation>
<EmitRTTI>0</EmitRTTI>
<Devirtualize>1</Devirtualize>
<MainBody>1</MainBody>
<CodePacking>0</CodePacking>
<SmartLinking>1</SmartLinking>
<Verbosity>1</Verbosity>
</Codegen>
<ConditionalDefines>
<HandleExceptions>1</HandleExceptions>
<AutoRefresh>0</AutoRefresh>
</ConditionalDefines>
<Linker>
<SourceMap>0</SourceMap>
<CompressCSS>1</CompressCSS>
<GenerateMobileManifest>1</GenerateMobileManifest>
<GenerateChromeManifest>0</GenerateChromeManifest>
<GenerateFireFoxManifest>0</GenerateFireFoxManifest>
<GenerateWidgetPackageConfigXML>0</GenerateWidgetPackageConfigXML>
<ExternalCSS>0</ExternalCSS>
<Theme>default.css</Theme>
<CustomTheme>0</CustomTheme>
<EmbedJavaScript>1</EmbedJavaScript>
</Linker>
<Output>
<HtmlFileName>index.html</HtmlFileName>
<OutputFilePath>www\</OutputFilePath>
</Output>
<Import />
<Execute>
<ServeManifest>0</ServeManifest>
<Server>0</Server>
<PauseAfterExecution>0</PauseAfterExecution>
<ExecuteType>2</ExecuteType>
<ExecuteableName>chrome.exe</ExecuteableName>
<ExecuteableParams>%output%</ExecuteableParams>
</Execute>
</Options>
<Files>
<File type="main">
<Name>WebForm</Name>
<Created>2015-05-22T16:09:59.328Z</Created>
<Modified>2015-05-24T21:54:48.785</Modified>
<Source>
<![CDATA[uses MainUnit, LoginForm, SynDate;
{$IFDEF SMART_INTERNAL_HANDLE_EXCEPTIONS}
uses SmartCL.System;
{$ENDIF}
{$IFDEF SMART_INTERNAL_AUTO_REFRESH}
uses SmartCL.AutoRefresh;
TW3AutoRefresh.Create.Start;
{$ENDIF}
var Application: TApplication;
{$IFDEF SMART_INTERNAL_HANDLE_EXCEPTIONS}
try
{$ENDIF}
Application := TApplication.Create;
Application.RunApp;
{$IFDEF SMART_INTERNAL_HANDLE_EXCEPTIONS}
except
on e: Exception do
ShowMessage(e.Message);
end;
{$ENDIF}
]]>
</Source>
</File>
<File type="unit">
<Name>MainUnit</Name>
<Created>2014-06-17T10:47:09.813Z</Created>
<Modified>2015-05-25T20:40:46.500</Modified>
<Source>
<![CDATA[unit MainUnit;
interface
uses
SmartCL.System, SmartCL.Components, SmartCL.Forms, SmartCL.Application,
SynCrossPlatformCrypto, SynCrossPlatformSpecific, SynCrossPlatformREST,
SmartTests,
LoginForm;
type
TApplication = class(TW3CustomApplication)
private
FForm1: TLoginForm;
protected
procedure ApplicationStarting; override;
public
end;
implementation
{ TApplication}
procedure TApplication.ApplicationStarting;
begin
FForm1 := TLoginForm.Create(Display.View);
FForm1.Name := 'Form1';
RegisterFormInstance(FForm1, True);
// register other forms here
inherited;
end;
end.
]]>
</Source>
</File>
<File type="form">
<Name>LoginForm</Name>
<Created>2014-06-17T10:47:09.813Z</Created>
<Modified>2015-05-22T16:10:08.171</Modified>
<Source>
<![CDATA[unit LoginForm;
interface
uses
SmartCL.System, SmartCL.Graphics, SmartCL.Components, SmartCL.Forms,
SmartCL.Fonts, SmartCL.Borders, SmartCL.Application,
SynCrossPlatformREST, SmartTests,
SmartCL.Controls.Label, SmartCL.Controls.Editbox, SmartCL.Controls.Panel,
SmartCL.Controls.Button, w3c.date;
type
TLoginForm=class(TW3form)
procedure W3Button1Click(Sender: TObject);
procedure ConnectClick(Sender: TObject);
private
{$I 'LoginForm:intf'}
protected
procedure InitializeForm; override;
procedure InitializeObject; override;
procedure Resize; override;
end;
implementation
uses
mORMotClient; // unit generated by the server!
{ TLoginForm }
procedure TLoginForm.InitializeForm;
begin
inherited;
// this is a good place to initialize components
end;
procedure TLoginForm.InitializeObject;
begin
inherited;
{$I 'LoginForm:impl'}
LogonPassword.InputType := itPassword;
end;
procedure TLoginForm.ConnectClick(Sender: TObject);
var model: TSQLModel;
begin
BrowserAPI.console.time('ORM');
writeln('Creating Data Model');
model := GetModel;
model.GetTableIndexExisting(TSQLRecordPeople);
var people := new TSQLRecordPeople;
var s := model.InfoExisting(people.RecordClass).ToJSONAdd(nil,people,true,'');
assert(s='{"RowID":0,"FirstName":"","LastName":"","YearOfBirth":0,"YearOfDeath":0,'+
'"Sexe":0,"Simple":{"F":"","G":[],"H":{"H1":0,"H2":"","H3":{"H3a":false,"H3b":null}},"I":"","J":[]}}');
s := '{"RowID":10,"FirstName":"ab\"c","LastName":"def","YearOfBirth":20,"YearOfDeath":30,'+
'"Sexe":1,"Simple":{"F":"","G":[],"H":{"H1":0,"H2":"","H3":{"H3a":false,"H3b":null}},"I":"","J":['+
'{"J1":1,"J2":"","J3":"reLast"}]}}';
assert(people.FromJSON(s));
assert(people.ID=10);
assert(people.FirstName='ab"c');
assert(people.LastName='def');
assert(people.YearOfBirth=20);
assert(people.YearOfDeath=30);
assert(people.Sexe=sMale);
assert(people.Simple.J.Count=1);
assert(people.Simple.J[0].J1=1);
assert(people.Simple.J[0].J3=reLast);
writeln('Connecting to the server at '+ServerAddress.Text+':888');
GetClient(ServerAddress.Text,LogonName.Text,LogonPassword.Text,
lambda(client)
client.LogToRemoteServer(LOG_VERBOSE,'localhost');
writeln('Safely connected with SessionID='+IntToStr(client.Authentication.SessionID));
people := TSQLRecordPeople.Create(client,1);
assert(people.ID=1);
writeln(people.ToJSON(client.Model,'*'));
writeln('Testing remote CRUD methods');
ORMTest(client);
BrowserAPI.console.timeEnd('ORM');
BrowserAPI.console.time('SOA');
writeln('Testing SOA remote access');
SOATest(client,
lambda
writeln('Disconnect from server');
client.Free;
BrowserAPI.console.timeEnd('SOA');
end,
lambda
writeln('ERROR!');
writeln('Disconnect from server');
client.Free;
BrowserAPI.console.timeEnd('SOA');
end);
end,
lambda
ShowMessage('Impossible to connect to the server');
writeln('ERROR at GetClient');
BrowserAPI.console.timeEnd('ORM');
end);
end;
procedure TLoginForm.W3Button1Click(Sender: TObject);
begin
BrowserAPI.console.time('LowLevel');
TestSMS;
BrowserAPI.console.timeEnd('LowLevel');
end;
procedure TLoginForm.Resize;
begin
inherited;
end;
end.
]]>
</Source>
<Design>
<![CDATA[<?xml version="1.0" encoding="utf-16"?>
<Form version="2" subversion="1">
<Created>2014-06-17T10:47:09.864</Created>
<Modified>2014-07-18T15:32:06.707</Modified>
<object type="TW3Form">
<Caption>mORMot Web Test</Caption>
<Name>LoginForm</Name>
<object type="TW3Label">
<Caption><b><i>mORMot</i> Web Test</b></Caption>
<Width>184</Width>
<Top>8</Top>
<StyleClass>h1</StyleClass>
<Left>32</Left>
<Height>32</Height>
<Transparent>True</Transparent>
<Name>W3Label1</Name>
</object>
<object type="TW3Panel">
<Width>192</Width>
<Top>40</Top>
<Left>24</Left>
<Height>264</Height>
<Name>W3Panel1</Name>
<object type="TW3EditBox">
<Value></Value>
<Text>User</Text>
<Range></Range>
<Width>128</Width>
<Top>104</Top>
<Left>16</Left>
<Height>32</Height>
<Name>LogonName</Name>
</object>
<object type="TW3Label">
<Caption>Name</Caption>
<Width>56</Width>
<Top>80</Top>
<Left>16</Left>
<Height>24</Height>
<Name>W3Label3</Name>
</object>
<object type="TW3Label">
<Caption>Password</Caption>
<Width>128</Width>
<Top>136</Top>
<Left>16</Left>
<Height>32</Height>
<Name>W3Label4</Name>
</object>
<object type="TW3EditBox">
<Value></Value>
<Text>synopse</Text>
<Range></Range>
<Width>128</Width>
<Top>168</Top>
<Left>16</Left>
<Height>32</Height>
<Name>LogonPassword</Name>
</object>
<object type="TW3Button">
<Caption>Remote Tests</Caption>
<Width>160</Width>
<Top>208</Top>
<Left>16</Left>
<Height>40</Height>
<Name>Connect</Name>
<OnClick>ConnectClick</OnClick>
</object>
<object type="TW3EditBox">
<Value></Value>
<Text>127.0.0.1</Text>
<Range></Range>
<Width>128</Width>
<Top>160</Top>
<Left>240</Left>
<Height>32</Height>
<Name>W3EditBox1</Name>
</object>
<object type="TW3Label">
<Caption>Server</Caption>
<Width>128</Width>
<Top>8</Top>
<Left>16</Left>
<Height>32</Height>
<Name>W3Label2</Name>
</object>
<object type="TW3EditBox">
<Value></Value>
<Text>127.0.0.1</Text>
<Range></Range>
<Width>128</Width>
<Top>40</Top>
<Left>16</Left>
<Height>32</Height>
<Name>ServerAddress</Name>
</object>
</object>
<object type="TW3Button">
<Caption>Offline Tests</Caption>
<Width>160</Width>
<Top>312</Top>
<Left>40</Left>
<Height>40</Height>
<Name>W3Button1</Name>
<OnClick>W3Button1Click</OnClick>
</object>
</object>
</Form>]]>
</Design>
<AutoCreate>
<IsAutoCreate>1</IsAutoCreate>
<IsMainForm>1</IsMainForm>
<Order>1</Order>
</AutoCreate>
</File>
<File type="unit">
<Name>SynDate</Name>
<Created>2015-05-24T21:54:27.308Z</Created>
<Modified>2015-05-24T21:55:23.323</Modified>
<Source>
<![CDATA[unit SynDate;
interface
uses
System.Types,
SmartCL.System,
w3c.Date;
type
JDateHelper = helper for JDate
private
function GetAsDateTime : TDateTime;
function GetAsLocalDateTime : TDateTime;
procedure SetAsDateTime(dt : TDateTime);
procedure SetAsLocalDateTime(dt : TDateTime);
public
property AsDateTime : TDateTime read GetAsDateTime write SetAsDateTime;
property AsLocalDateTime : TDateTime read GetAsLocalDateTime write SetAsLocalDateTime;
end;
implementation
function JDateHelper.GetAsDateTime : TDateTime;
begin
Result := Self.getTime / 864e5 + 25569;
end;
procedure JDateHelper.SetAsDateTime(dt : TDateTime);
begin
Self.setTime((dt - 25569) * 864e5);
end;
function JDateHelper.GetAsLocalDateTime: TDateTime;
begin
Result := (Self.getTime - 60000 * Self.getTimezoneOffset) / 864e5 + 25569;
end;
procedure JDateHelper.SetAsLocalDateTime(dt: TDateTime);
begin
Self.setTime((dt - 25569) * 864e5 + 60000 * Self.getTimezoneOffset);
end;
end.
]]>
</Source>
</File>
</Files>
<Target>Browser</Target>
<Generator>Visual Component Project</Generator>
</Project>
</SMART>
Offline
The best html5 based mobile web UI framework I found so far: http://www.idangero.us/framework7/
Smart Mobile Studio is cool and I love the Object Pascal language, but I wouldn't use SMS because it's not well-documented the last time I checked. On the hand, if you use JavaScript you'll find that you can find ready-to-use solutions and documents for every single problem you might encounter.
Last edited by edwinsn (2015-12-17 09:10:36)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I just created a wrapper around Framework7 to be used with Smart Mobile Studio. it's not finished yet. You can use SMS basic version and consume mORMot services.
Live preview:
https://rawgit.com/smartpascal/smartms/ … eview.html
Offline
@warleyalex
This sample is just great!
Could you please publish the source code, once stabilized, so that we may be able to publish it as third-party sample?
It may be a very good starting point for other users...
Framework7 rendering sounds fine and responsive, even on a mobile.
Direct URI for a mobile app may be https://rawgit.com/smartpascal/smartms/ … index.html
Offline
@warleyalex, you are fast! And it also proves that Framework7 is easy to use while powerful
@ab, I inferred the github repository of warleyalex's example: https://github.com/smartpascal/smartms
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
This is a very experimental SMS + F7 + mORMot
Compiled with SMS Basic Version (v2.1.0.3592)
https://www.dropbox.com/s/zwpwqa2fh1k1u … 7.rar?dl=0
I have included some mORMot SmartPascal tests, unfortunately, we have some issues in SMS ver 2.2.0.4165 (Offline Tests); for instance (at SmartTests.pas), we get different results:
s := '2014-06-28T11:50:22';
D := Iso8601ToDateTime(s);
// ver2.1.2.3592 D= 41818.493310185186 --> 6/28/14 11:50:22
// ver2.2.0.4093 D= 41818.305810185186 --> 6/28/14 7:20:22
I have replaced SmartCL.System and System.Types to SmartCL.System.Lite to compiler generate small JS code. A webserver to run the project is required.
---------
I've discovered today, SmartTests.pas will work as expected with the latest SMS 2.2.0.4165 beta4 if you edit SynCrossPlatformSpecific unit and include "System.DateUtils" unit.
SmartCL.System.Lite,
System.Date,
System.DateUtils,
w3c.date;
I also have to edit DateTimeToIso8601 function which uses the function FormatDateTime, this function expects an extra param.
function DateTimeToIso8601(Value: TDateTime): string;
begin // e.g. YYYY-MM-DD Thh:mm:ss or YYYY-MM-DDThh:mm:ss
if Value<=0 then
result := '' else
if frac(Value)=0 then
result := FormatDateTime('yyyy-mm-dd',Value,DateTimeZone.UTC) else
if trunc(Value)=0 then
result := FormatDateTime('Thh:nn:ss',Value,DateTimeZone.UTC) else
result := FormatDateTime('yyyy-mm-ddThh:nn:ss',Value,DateTimeZone.UTC);
end;
Last edited by warleyalex (2015-12-20 22:09:47)
Offline
Seems like there is a better future for SMS, time will tell:
https://jonlennartaasenden.wordpress.co … le-studio/
Merry christmas to you all !
Offline
@moctes
Nice blog article, but we do not need stories about SMS potential and implementation wishes, but real working features.
Some ideas sounds like FUD to me, from the technical point of view.
Running too many races at once for a small company is never a good idea.
We do not need to know what SMS "can do", but what SMS "does". Focusing on a single target, e.g. mobile apps with a decent UI (not the current RAD approach, which is difficult to work with on real projects with a lot of screens) would be a good start.
For instance, JavaScript for IoT is a joke.
A Raspberry PI is not a IoT target, it is a whole computer.
A true IoT device is e.g. https://en.wikipedia.org/wiki/ESP8266 - and you won't run JavaScript on it! but FPC maybe.
So come on, Smart Company!
Pick up a clear goal, and focus on it!
Offline
Another web frontend framework that might be of interesting is VCL.JS - it's based on TypeScript (a language which is very similar to Delphi created by the same creator of Delphi), and it mimics the VCL's conception for component encapsulation based for the most popular html framework Twitter BootStrap.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@All, @EMartin
I have written a model for OpenUI5, that can communicate directly with a mORMot REST server.
It uses some of the odata features, but mostly client side features and on-demand data-loading.
I am performing the last tests and will send an example to Ab soon. To get final advice.
I, for myself, am very happy and impressed by OpenUI5.
Once the model is there, all other things are very easy by OpenUI5 magic !!
Offline
@AOG, that must be very helpful for people who want to consume a mORMot-powered REST server from inside the browser using JS!
BTW, you must have chosen OpenUI5 for good reasons, care to tell us briefly about why you have chosen it over other html frontend frameworks? Thanks in advance.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
@edwinsn
To be honest, I just heard of OpenIU5 from a previous message in this message thread (by EMartin).
In the (very recent) past, I had a lot of work implementing business logic for mORMot webaccess.
OpenUI5 seemed a perfect fit !
OpenUI5 has all that you need, regarding business-logic.
And much much more for making a nice UI.
The demo I am preparing will show you the ease of use.
It is still limited to read-only, but I am already working on that !
Offline
First commit here: https://github.com/LongDirtyAnimAlf/OpenUI5_mORMot/
Please be kind ... ;-)
Offline
AB,
Do you consider SMS to be stable enough to be used with mormot? (The none UI part)
Last edited by Leslie7 (2016-01-18 13:59:34)
Offline
Any news on the UI front? OpenIU5 , Framework7 ...? I am looking for a production ready UI solution to be used with mORMot.
Offline
Well ... I am working very hard at the moment to get the combi mORMot / OpenUI5 running.
You can try :
https://github.com/LongDirtyAnimAlf/OpenUI5_mORMot
Basic CRUD is ok.
Now I am working on the pending changes feature !
Offline
Great work AOG !!!
Do you converting from/to OData protocol to REST ? If so do you read this posts ?
http://scn.sap.com/community/developer- … json-model
and
http://scn.sap.com/community/developer- … ce--part-3
Your demo use Lazarus, can you make the demo Delphi compatible ? I use Delphi 7 only.
Thanks.
Esteban
Esteban
Offline
Yes, I looked at these posts.
But they all extend the very simple client side standard JSON model.
The OData model has much more features.
And will receive much more attention and updates in the future.
Thats why I decided to hack the OData model.
Until now, with great success.
Nearly all OData features are working.
I will add a Delphi server in short notice !!
Offline
Thanks AOG, I'll wait your Delphi version of your demo !!!
Esteban
Offline
I also don't have Lazarus, server for D7 would be nice. Anyway I have been able to successfully test the demo and worked fine.
You have a ListView for calling remote mORMot JSON data, in your example, you're populating the ListView with remote JSON using the ORM select=* (it displays all records/items at once).
Would be nice to implement a ListView (lazy loading / infinite scrolling feature) for fetching remote JSON data. For instance, initially displays 10 data at one time and as the user scrolls down, more data is loaded.
Offline
Delphi project (dpr) added !
Some form of lazy loading is enabled by just loading the necessary data when needed.
But couting would be better.
Needs a few changes for the mORMot however:
mORMot can report back a total remaining (count) records.
OpenUI5 needs next available records.
I have enabled two-way-binding !
Give it a try. Not perfect, but a very nice feature of OpenUI5 !!
Offline
It works, but dpr in Delphi should look like this:
program SAPUI5Server;
uses
Forms,
Main in 'Main.pas' {Form1},
SampleData in 'SampleData.pas';
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Michal
Offline
Done. Thanks.
ps:
Delphi(7) users should give FPC\Lazarus a try !
Among many other things, it will give you multi-platform !!
Offline
I use Delphi 10 Seattle but I do not avoid from Lazarus and especially CodeTyphon which is heavily multi-platform.
Offline
AOG,
You seem to write a lot of JS code. Would it not be better to use SMS? It would allow Delphi/Lazarus programmers to join.
Anyway, Great work!
Leslie
Offline
It seems the SMS team is getting more envolved : http://smartmobilestudio.com/news/
Offline
@Leslie7
I tried SMS ... and did not succeed (yet) ... but if they get things going, I will give it a very serious go !!
But, since my discovery of OpenUI5, and looking into great detail into their methods, I am very impressed !
Just try the two way binding ... its very nice.
And the canceling of pending changes !!
@All.
TSQLRawBlobs are now supported.
They can also be changed by uploading new data !
Offline
AOG,
Maybe there is a slight misunderstanding here. What I meant was creating the code to interface OpenUI5 with mORMot in pascal using SMS. It could be a better fit for Delphi/FPC programmers who are recluctant to get into the depths of JS. It could make locating problems easier or adding their own work.
Offline
Nice idea !
But to implement this, I would have to use SMS to generate OData metadata on-the-fly.
Which would be a very complex task (for me).
However, I am still thinking of asking Ab to add some extra info into the REST server that mimics part of the OData metadata.
A list of tables with their fields and datatypes (at ...:8080/root/$metadata) could to wonders ... ;-) .... !!!
But for now, I am sticking to the standard features of mORMot and try to get as far as possible.
Goal is to get the REST model to do full CRUD with mORMot.
Offline
Added mORMot authentication into OpenUI5 REST model !!
See : https://github.com/LongDirtyAnimAlf/OpenUI5_mORMot/
Thanks @esmondb for the auth-code.
Offline
Well done AOG, although I wish you have used AngularJS or other popular js frameworks those are more obvious to customize the UI at the html/css level instead
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Thanks.
You are right regarding the UI customizing ... OpenUI5 looks not that exiting ... and these looks are not easily modified.
But I was seduced by the business-logic already available in the framework.
Its made for databases, and mORMot is a database.
So, the only thing needed to get OpenUI5 things running was a mod of the OData model.
And, as from now, OpenUI5 can be used with mORMot.
My personal needs were also important:
mORMot backend on a 64 bit Arch Linux T2 tier in the AWS (Amazon) cloud.
Win/Mac/Linux GUI's.
Mobile client for quick and dirty updates of the database.
I have made (native) mobile clients with Delphi and FPC (android).
Decided that a web-interface is better in the long run : no install and suitable for all systems.
And also important: youngsters do not know a desktop anymore ... ;-)
Offline
I'm not completely sold on twitter's bootstrap. OpenUI5 and vcljs look really interesting. I tried bootstrap version 2, but needed to make quite a few tweaks for my use case. Then version 3 broke my tweaks and changed default css box-sizing causing more problems. Version 4 seems delayed.
Offline
For a web client, also consider a "classical" dynamic web site.
The MVC feature of mORMot, using Mustache templates, is very powerful.
See http://synopse.info/files/html/Synopse% … l#TITL_108
Those HTML5 frameworks are great for mobile apps, but a dynamic web site could be much easier to implement and maintain.
Much less javascript to write and debug!
Offline
@ab
100% agreed ... but mobile is a must for my current app ...
Offline
Huge refactoring of mORMot REST model for OpenUI5.
Metadata generated by mORMot server ... somewhat similar to OData metadata.
Lazyloading fully enabled.
Server side sorting and filtering enabled.
Still not 100%, but worth a try .... ;-)
Offline
I'll take a look at OData features.
Even if I was never convinced by the OData protocol - see http://www.odata.org - about e.g. URI encodings, which are IMHO not truly RESTful, but over engineered, like most OASIS standards, or MS-defined tricks. Big companies do gender non-sense monstruous ideas...
For instance, the following, to retrieve a resource, is a real PITA:
GET http://services.odata.org/v4/TripPinServiceRW/People('russellwhyte') HTTP/1.1
OData-Version: 4.0
OData-MaxVersion: 4.0
What is this People('keyname') syntax about?
Where does it come from? Not from REST definition, for sure!
See https://www.ics.uci.edu/~fielding/pubs/ … _style.htm and http://synopse.info/files/html/Synopse% … tml#TITL_9
And the more you are going into the standard, the worse...
Offline
Getting off the subject. Mr. Christian-W. Budde has released a ts2pas a tool to convert TypeScript definition files (.d.ts) to DWScript based Object Pascal headers (.pas)
Offline
@AOG
I've taken a look at your nice OData implementation.
There is an issue with Int64 values...
All integer values are defined as "Edm.Int32", whereas we may return much more information, e.g. up to 38 bits for a TTimeLog and up to 64 bits for a TID (in practice, up to 63 bits for TSynUniqueIdentifier).
AFAIK, due to restriction of JavaScript numbers of 53-bit resolution for integers, we should transmit TID as strings...
In fact, this is what OData expect for "Edm.Int64" fields: they should be transmitted as strings!
This resolution issue may affect any kind of AJAX clients...
Offline