Almost every time I'm debugging some core part of our framework, I like to see the generated asm, and trying to optimize the pascal code for better speed - when it is worth it, of course! I just made a nice observation, when comparing the assembler generated by Delphi to FPC's output. Imagine you […]
2015-06-16
Handling Cross-Platform Time Zones
2015-06-16. Open Source › mORMot Framework
One common problem when handling dates and times, is that time is shown and entered as local, whereas the computer should better use non-geographic information - especially on a Client-Server architecture, where both ends may not be on the same physical region.
![]()
A time zone is a region that observes a uniform standard time for
legal, commercial, and social purposes.
Time zones tend to follow the boundaries of countries and their subdivisions
because it is convenient for areas in close commercial or other communication
to keep the same time.
Most of the time zones on land are offset from Coordinated Universal
Time (UTC) by a whole number of hours, or minutes.
Even worse, some countries use daylight saving time for part of the year,
typically by changing clocks by an hour, twice every year.
The main rule is that any date and time stored should be stored in
UTC, or with an explicit Zone identifier (i.e. an explicit offset to
the UTC value).
Our framework expects this behavior: every date/time value stored and handled
by the ORM, SOA, or any other part of it, is expected to be UTC-encoded.
At presentation layer (e.g. the User Interface), conversion to/from local times
should take place, so that the end-user is provided with friendly clock-wall
compatible timing.
As you may guess, handling time zones is a complex task, which should be
managed by the Operating System itself.
Since this cultural material is constantly involving, it is updated as part of
the OS.
In practice, current local time could be converted from UTC from the current system-wide time zone. One of the only parameters you have to set when installing an Operating System is to pickup the keyboard layout... and the current time zone to be used. But in a client-server environment, you may have to manage several time zones on the server side: so you can't rely on this global setting.
One sad - but predictable - news is that there is no common way of encoding
time zone information.
Under Windows, the registry contains a list of time zones, and the
associated time bias data. Most POSIX systems (including Linux and Mac
OSX) do rely on the IANA database, also called tzdata - you may
have noticed that this particular package is often updated with your
system.
Both zone identifiers do not map, so our framework needed something to be
shared on all systems.
2015-06-06
GetIt "Spirit" Concerns
2015-06-06. Pascal Programming
I'm confused by the GetIt Submitting official blog page. Reminds me the darker ages of Delphi licensing change of XE3. GetIt is the new XE8 package manager for RAD Studio. Information about how to submit your libraries to GetIt has just been made available by Embarcadero. The idea behind GetIt is […]
2015-06-01
Updated Slides about ORM SOA MVC SOLID DDD
2015-06-01. Open Source › mORMot Framework
One year ago, we published a set of slides about the main concepts implemented by our framework. Mainly about ORM (and ODM), NoSQL, JSON, SOA, MVC (and MVVM), SOLID, DDD, CQRS and some patterns like Stubs, Mocks, Factory, Repository, Unit-Of-Work. Worth a look, if you want to find out the benefits […]
2015-05-24
Introducing BeginEnd.net
2015-05-24. Pascal Programming
Did you notice the new https://www.beginend.net web site, by Eric Grange? It is a blog feeds aggregator web site, dedicated to Delphi! It features: a maintained list of websites (including our very little blog); fast to load - thanks to good use of CDN; is not polluted by ads; nor breaking the links […]
2015-05-18
CQRS Persistence Service of any DDD object with mORMot
2015-05-18. Open Source › mORMot Framework
We introduced DDD concepts some time ago, in a series of articles in this blog. At that time, we proposed a simple way of using mORMot types to implement DDD in your applications. But all Domain Entitities being tied to the framework TSQLRecord class did appear as a limitation, breaking the […]
2015-05-14
Using TSynLog with a lot of threads? PYou should better upgrade your source
2015-05-14. Open Source › mORMot Framework
We identified and fixed today several issues which may affect applications creating a lot of threads (i.e. not using a thread pool). The symptom was an unexpected access violation, when you reach a multiple of 256 threads count. You should better upgrade to at least revision 1.18.1351 if your […]
2015-05-08
I do not like people shoot in my foot, do you?
2015-05-08. Pascal Programming
There was some discussion about the new
TStringHelper feature introduced in latest versions of
Delphi.
I was
told to be some kind of archaic guy, not able to see the benefit of
this.
Reducing opinions to a conservative/progressive approach - another famous 10
kinds of coders - is very reductive.
Of course, this was IMHO unfair and my point was that I have the feeling
that some decisions about the Delphi language and RTL are inadequate.
Some changes are welcome. I enjoy the introduction of generics - even if it is
was painful, and even buggy (do not use TList<T> with
managed record types in XE8!).
But some upcoming changes about the string policy - breaking
everything just because we want to align with mainstream C# or Java habits -
are just non sense to me.
I really think that Embarcadero deciders like to shoot their own foot.
Or - certainly worse - our own feet!

I will post here some part of the discussion...
So that we may be able to share our ideas.
« previous entries - page 14 of 52 - next entries »
