Our SynDBExplorer free tool has been enhanced. A SQL request history has been added to the software. It is now able to handle directly Jet / MSAccess .mdb files. It has also several fixes included (including Oracle direct link), and the internal SQLite3 engine has been updated to its latest […]
2012-06-18
Circular reference and zeroing weak pointers
2012-06-18. Pascal Programming
The memory allocation model of the Delphi interface type uses
some kind of Automatic Reference Counting (ARC). In order to avoid
memory and resource leaks and potential random errors in the applications (aka
the terrible EAccessViolation exception on customer side) when
using interface, a SOA framework like mORMot has to offer
so-called Weak pointers and Zeroing Weak pointers
features.
Note that garbage collector based languages (like Java or C#) do not suffer from this problem, since the circular references are handled by their memory model: objects lifetime are maintained globally by the memory manager. Of course, it will increase memory use, slowdown the process due to additional actions during allocation and assignments (all objects and their references have to be maintained in internal lists), and may slow down the application when garbage collector enters in action. In order to avoid such issues when performance matters, experts tend to pre-allocate and re-use objects: this is one common limitation of this memory model, and why Delphi is still a good candidate (like unmanaged C or C++ - and also Objective C) when it deals with performance and stability.
2012-06-14
Introducing TInterfacedCollection dedicated class
2012-06-14. Open Source › mORMot Framework
TInterfacedCollection dedicated class has been defined, properly
handling collection item creation on the Server side, with interface-based services: all
contract operations shall use a class inheriting from it, instead of the
standard TCollection, which was not defined as needed for our
high-level needs. 2012-06-13
Retrieve the object instance from an interface
2012-06-13. Pascal Programming
It is pretty useful, in some cases, to retrieve a class
instance from a given interface.
You should better use
interfaces in your business logic, but having access to the underlying
implementation is needed at lower level.
Beginning with Delphi 2010, you are able to use the as
operator, e.g. via aObject := aInterface as TObject or
aObject := TObject(aInterface).
This operator use a special hidden interface GUID (ObjCastGUID) to
retrieve the object instance, calling an enhanced version
of TObject.GetInterface.
But if you want to maintain compatibility with older version of Delphi (as we want for mORMot to work with the beloved Delphi 6 or 7), you'll have to find a way.
2012-05-28
Synopse mORMot Framework 1.16
2012-05-28. Open Source › mORMot Framework
Our Open Source mORMot framework is now available in revision 1.16.
The main new features are the following:
- Interface-based services, i.e. comparable to WCF, but with Delphi strengths;
- ORM cache which purpose is to enhance server scaling and client responsiveness;
- Automatic JOIN query to unleash the underneath DB power;
- SQLite3 engine updated to latest revision 3.7.12.1;
- Major update of the associated documentation (now more than 800 pages);
- A lot of bug fixes and enhancements, mainly from users requests - thanks you all for your feedback, patches and ideas!
Thanks to its features, mORMot is now able to provide a stand-alone Domain-Driven Design framework for Delphi.
Quite a long and nice road for a little mORMot, and more to come!
Is marketing the new native?
2012-05-28. Pascal Programming
In a very nice (like always) blog post, trolling comments were dispatched about the "native" concept:
- Firemonkey is Native UI;
- For RemObjects, .Net is the new native in Windows.
From the technical point of view, both assertions are false.
The article was subtitled: "Say a Lie Often Enough and You’ll Start Believing it Yourself".At least, it is a trolling subject.
It remembered me about some of my past studies, i.e. five years of university studies in Medieval Theology in Italy and France (yes, I know, this is strange background for a Delphi programmer):
"Stat Roma pristina nomine, nomina nuda tenemus"
Our modern world is not thinking any more, it is sinking into nominalism, whereas IMHO the scientific approach is more compatible with a realistic approach of universals.
Today, marketing is everything.
Is it a necessary
evil?
2012-05-25
Domain-Driven design
2012-05-25. Open Source › mORMot Framework
With a previous article, we introduced the concept of "Domain-Driven design" into our framework presentation.
It's now time to detail a bit more this very nice software architecture design, and how mORMot is able to achieve such an implementation pattern.
2012-05-20
Recursive calls and private objects
2012-05-20. Pascal Programming
In a Stack Overflow question, someone asked about some nested procedure call he found out. That is, a procedure inside another procedure.
He found out this coding style to be messy, which sounds like a reasonable opinion. But his alternative proposal of putting the internal procedure outside the main one, i.e. making it global, is IMHO even worse.
In some case, a private class, or even record
or object with methods is an handy and maintainable implementation
pattern.
« previous entries - page 33 of 52 - next entries »
