You are not logged in.
I've never used the command line compiler; at least I don't remember doing it in the last 20 years. If you paste here the exact command line you have used, I can try it here
Btw, editing the mormot.net.rtsphttp.pas from the IDE, and then closing the file, was also hanging the whole D2007 IDE
I'm slicing mORMot2 on a bunch of packages, targeting the maximum division possible, at least at start. So far it worked fine, although a few lines must be changed by hand in one unit
If anyone is interested, please drop me a line
If you try to compile \mORMot2\test\mormot2tests.dpr, D2007 IDE compiler will hang in mormot.core.mustache.pas
It's not the project: when trying to anything that uses any of:
mormot.core.mustache.pas
mormot.net.rtsphttp.pas
mormot.db.sql.pas
the D2007 IDE compiler will hang
I don't know if there are more units that hangs
If it is worth anything: investigating the problem on mormot.net.rtsphttp.pas, I found the problem related to the class field:
fPendingGet: TRawUTF8List;
any line using it would hang the compiler, except for the declaration itsef, and fPendingGet.Free
Hope it helps
But the problem is the input... In MVVM, the view is bound to properties on the VM, and that binding must be bidirectional, unless it's just a report or something as that, wich is not the MVVM target
The view is expected to be codeless or as near to it as possible, and to alter the VM just through binding (and actions to a lesser degree)
the difference between MVC and MVVM is more about marketing and actual implementation details than a real design disruption.
I don't understand ![]()
IMHO, MVVM is not the same as MVC; for what I'm learning, MVVM gives a bigger decoupling than MVC: The VM should know nothing about the View. The view should be linked to the VM only through property binding and parameterless actions
I believe that the difference exists; MVVM might have started from MVC or MVP, but they are not the same
Could you please help me a bit more, to understand how to use MVVM with mORMot?
@ab ?
Is for real the MVVM in the documentation, or a typo?
What do you do from the begin/end thread? Open and close the connection?
Does the datamodule host all the app tables and business rules?
Reading the documentation, it talks about MVC and MVVM
Implementing MVC with mORMot services seems clear
But... MVVM? As I understand it, MVVM is heavily based on binding properties from the View to the VM. That means any change on a View property must be transferred to the VM. And also de opposite: any change on the VM must be transferred to the View
I can not see how it can be done
Is there any example somewhere?
Thanks
I don't know if this is right or not, but removing the SynUnicode Trim version and the overload qualifier, it compiles fine
function Trim(const S: SynUnicode): string;
Hello,
In today's refactoring, compiling SynCommons with D2007 stops with this error:
[DCC Error] SynCommons.pas(24041): E2251 Ambiguous overloaded call to 'Trim'
The offending line is:
function TrimU(const S: RawUTF8): RawUTF8;
begin
result := Trim(s); <------
end;
@radexpol our app is a VCL monolith, there are no tiers: refactoring that to a n-tier cross platform is our goal
We are going for a MVVM approach there
Back to plugins: the exe just loads the main bpl, wich provides most of the erp-agnostic services: base form classes, security, automation, reporting, everything
The whole ERP is in fact a bunch of plugins that use the basic classes and services, and offer new classes and services to anyone that needs them
There are more ERP plugins providing major (ie. Manufacturing) or minor functionality, and the customer plugins, wich again can be major (ie.airport handling) or minor (ie.integration with a customer web)
All this depends heavily on sharing classes between plugins, and that is natural with BPL
I don't have any idea on how to do that without BPL. To be honest, I never had any need to restrict myself to DLL
You are forgetting we have bpl
I have a standard ERP, and for the few customers with non standard needs we make modules (packages) that plug in the system, using all standard stuff, and adding or overriding any functionality
I'm starting with mORMot, so I'm just making some packages with the sources, wich works fine
Drawback: when you build a new version, you need to rebuild the customer packages as well
Could you please update us when any part of mORMot 2 is production ready?
Thank you very much; that has helped me a lot
In mORMot, do you use triggers and all other SQL stuff, or you should do it in Delphi?
I'm not asking if you can do it, but if you are expected to do it
mORMot has many useful libraries merged, and I understand mORMot2 will try to somehow break them down in diferent units
I think that maybe some libraries get "finished" much earlier than others
Is it possible to have an updated list with the "finished" ones?
As an example, I believe JSON handling will get the finished status way earlier than others
@Javierus "split the project in subprojects"... in fact I was going into the opposite direction.
A lot of units will always be shared among projects.
And due to that, we have regularly a lot of problems with users having e.g. SynCommons.pas from SynPDF project and mORMot project in their path, and failing to compile.
So my idea would be to remove separate projects, and download and use mORMot as main source. If units are refactored into smaller and well-scoped units, it would be just fine to use only SynPDF or SynMustache and not the REST/ORM/SOA part.
I still advocate for this... But not replicating all the code on each repository; what I suggest (from the ignorance) is having side-by-side repositories, with "Core" repository(es) used by the other repos. It's not uncommon to see a repo that needs another repo from the same author, or even needs Spring4D or whatever else
All in a single repository, even if it's easy to use just a part of it, will scare devs. And not only newbies. (Do we still have newbies in Delphi?)
First: The blog topic has fooled some people: yesterday I was told that you were dropping Delphi and keeping only FPC.
1) Compiler versions: whatever you decide will be fine. Myself, just finished migrating from D5 to D2007, and halfway from D2007 to D10.3.3
2) Non-visual components: a must te get more users onboard
3) Spliting units: Bravo! Right now loads of wonderful stuff is lost there
4) Spliting documentation: from mobile devices is very very difficult loading the current page; many times I just can't load it all. There is even a chinese page that uses your documentation page as demonstration for a web client library performance
Please, please, split the project in subprojects that will give both more visibility and more users. Right now I've started to use just your JSON library, but it took with it a load of unrelated stuff. Make it so you have, say, "Core", "JSON", "Mustache" and all the great stuff.
You will have perhaps 5 or 20 subprojects, that will attract developers by themselves. Each repo will get people looking for that specific stuff, and once they are onboard, it's way easier they are interested on the other stuff
I'm probably wrong, but I believe spliting and decoupling your repos will boost very much the mORMot family
Standard troll behavior, of course
OpenSource defines a given software, and has nothing to say about the toolchain
My advice is to use the ORM part as a simple data storage layer only
Now I'm begining to get it; I was absolutely lost.
Thanks for all the advices packed in your answer; will be of great help.
Don‘t rely your business rules on TSQLRecords but on business PODOs. That‘s my advice for building complex servers based on mORMot.
I'm very grateful for your advice, thank you very much.
I've been programming Pascal for 35 years, but I'm the lowest newbie in ORM stuff; so I'm not sure I truly understand you.
Is your advice taking all the mORMot framework, but the ORM part?
Any direction on where to find some information about "Rely your business rules on business PODOs"?
Thanks again, AB
Somehow I missed it; now I've read and on my way to understanding the mechanics
I'm used to put my business logic on the OnBeforePost, OnAfterPost, OnBeforeDelete, and so on.
Where and how should I implement the business logic of objects?
I'm refering not just to field validation, wich currently I implement on the OnBeforePost, but also things as deletion validation (Is acceptable deleting this object?), insert validation, side effects on other objects, and so on.
Hello,
I'm trying to understand how the bussiness rules work in the ORM.
In the case where an article affects other, how can I do it?
Example:
TSQProductRecord = class(TSQLRecord)
private
fReference: RawUTF8;
fName: RawUTF8;
fPrice: Double;
fStock: Double;
published
property Reference: RawUTF8 index 30 read fReference write fReference;
property Name: RawUTF8 index 100 read fName write fName;
property Price: Double read fPrice write fPrice;
property Stock: Double read fStock write fStock;
end;
TSQLMovementRecord = class(TSQLRecord)
private
fIDproduct: TRecordReference;
fDelta: Double;
fDate: TDateTime;
published
property IDproduct: TRecordReference read fIDproduct write fIDproduct;
property Delta: Double read fDelta write fDelta;
property Date: TDateTime read fDate write fDate;
end;How could I code that Delta should accumulate on the Stock field on the linked Product?
How can I reject a Movement is saved with a non-existent IDproduct?
I have no clue, and am unable to find any info on this topic.
Thanks in advance
I mean, other than the creators.
There is no documentation and no examples; the help through the forum is scarce.
I'd like to give it a try, but looking at all that I'd not dare integrating this in my product
Please, tell me I'm wrong
Using the ORM is not mandatory.
You can use the interface-based SOA feature of the framework without the ORM.
Or the MVC/Web feature, without the ORM.
Yes, that I already know; I plan on go full mORMot over time, and I believe the ORM will be that last step, one table (or table group) at a time
If your results are TDataSet, check the DataSetToJSON() method from our SynVirtualDataSet.pas unit.
It could help you exporting your TDataSet results as a RawJSON output parameter for the SOA.
Already read about it; will use.
About BDE and multi-threads, you have threading options to the interface-based services. See the documentation about it.
Or you can just use a lock.
Ok, thank you very much, I believe is what I need; I'll learn it
From my experiments, using ElevateDB will be slower than SQLite3.
I'm sure, but for old code compatibility, I need Locate, SetRange, FindNearest and all that. Once refactoring will free me from such code, leaving just SQL or ORM, I'll chose other database engine
Again, thank you very much
Thank you for your help, ab
Since you answered me I've been reading every day the documentation and the forum, learning a lot about your exceptional work, and this trip is making me a better programmer
Hello,
I've been reading and learning mORMot stuff for a few months, although I still have not used it.
I apologize for the nonsense that I'm sure will be in (part) of my questions.
Mine is a micro business, with a long experience, but technologically stuck in year 2000 till this January.
And I'm still using Paradox under BDE; already started the transition to ElevateDB (chosen cause it is a SQL engine, but also engineered for good performance with navigational db handling)
My application is a legacy one (currently migrating from D5 to D2007), and although it does a good service to my customers, it's a clear BBM. I will follow your advice on driving Legacy to SOLID
And I have two, quite different questions:
1) I need to start with REST. AFAIK, the BDE is not reentrant nor threadsafe, so I was wondering if I could use interface or method based REST with just a single thread, one request at a time
2) Right now, all the business logic is in a few datamodules, wich are in fact Singletons, cause they are created just once, and any change on any table is channeled through those datasets. They have the business logic on the dataset events, and elsewhere on the app all datasets are just read only
The question is, Could mORMot work above them, using the Tdatasets as source?
Thank you for your patience reading this ![]()
Hello, and excuse this newbie question. I've been trying to understand the documentation, but so far I'm quite unable to do it without geting lost.
Perhaps it's just that all the mORMot framework depends on the ORM, and it's so obvious that is taken as asserted by default.
But I'll dare to ask: Is the MVC/MVVM/REST dependent deom the ORM part?
Thank you in advance