#2 Re: mORMot Framework » [Slightly Offtopic] Preliminary query of company to implement server » 2020-11-18 09:10:28

Basically I do not care who takes the project when/if it comes alive smile

I just posted here if some company would reach back to me for it. Would be very pleased if it based off of mORMot.

Just offering (preminilary) business opportunity, to mORMot community.

Hope this makes it bit more clear.

Also trying to point out if this project goes live, I would try to influence that as much of it as possible is released as Open Source so community can benefit, if something along those lines is developed.

-Tee-

#3 mORMot Framework » [Slightly Offtopic] Preliminary query of company to implement server » 2020-11-18 06:13:20

TPrami
Replies: 4

Hello,

First of all, Sorry that I can't give much details on this.

One Finnish nonprofit organization is starting project that would need an server. As far as I can tell (so far), server would be pretty trivial. It'll would be for Android and iOS client.  Would be Windows or linux server, not sure yet.

If everything goes as I would like it to, if needed to develop libraries or mORMot, all paid work, would be released as open source, but not the final product.

I would need some very rough price per some unit (which your company uses).

And even better if you can make single source Android and iOS app even better, only difficult on these apps is that it should be able to take photos and have some ML/AI thingy that tries to detect object. (Objects are similar, but might be different shape or color, should give some probability of detection ) smile

Feel free to ask, not sure can I give specific answer tough sad

Sorry for quick and dirty post.

-Tee-

#4 Delphi » Test your product with UTF-8 beta setting » 2020-03-19 06:10:21

TPrami
Replies: 0

Problem very poorly explained at : https://quality.embarcadero.com/browse/RSP-21814

Please vote for it.



Now we have seen many cases of this that customers have bought new computer and this setting has been on as default. And then at least our software stops working.



Hope that you'll test this in on your own environments and products. and report your findings on that Ticket. I'll try to get on this also day, and report more exact findings.



-Tee-

#5 Re: mORMot Framework » Revision 2.x of the framework » 2020-03-12 11:28:11

ab wrote:

I am preparing the new repository, and start naming things and folders.
Check https://github.com/synopse/mORMot2

We propose to switch to dotted named units, e.g. mormot.core.json.pas

WOOOHOO!!!!

#6 Re: mORMot Framework » Revision 2.x of the framework » 2020-03-12 09:42:58

mpv wrote:

Nice!
BTW size of SynCommons is not a problem for Lazarus, only for Delphi.

Size of problem for Programmers mainy, easy to start new project, couple of units in uses and that's it. But pain to go through, be SyCommons have lot of stuff most of users have not even seen smile

I would prefer unit scopes/namespaces but that would mean dropping quite many delphi versions (dotted filenames) mORMot.JSON.Utils /mORMot.UF8.Utils ... (or similar)

For older delphi versions  there would always be 1.18, so not the worst thing to drop all but pretty much patest delphi versions.

-Tee-

#8 Low level and performance » What or are benefits of using Daniel Lemire's method for Dicti » 2020-02-17 12:51:12

TPrami
Replies: 2

Has it been measured yet? Memory usage/Speed etc? Is there clear measurable menefit?

-Tee-

#9 Re: Delphi » With haters unite » 2020-02-06 11:16:59

Sorry, posted wrong link like 4 times sad

-tee-

#10 Delphi » With haters unite » 2020-02-06 07:43:14

TPrami
Replies: 1

With haters unite, please vote for this :

https://quality.embarcadero.com/browse/RSP-18953

Compiler (etc) assisted with removal Refactoring tool would be super cool.

Sometimes so error prone to remove by hand, especially nested withs.

(oops wrong link at start)

#11 Re: Language » Does anyone know how to update value of Interface property with RTTI » 2020-01-16 08:22:40

That was the case, which is kind of bummer.

Went with invoking the Setter-method to update the value. Need to add

  {$RTTI EXPLICIT
    METHODS([vcPublic, vcPublished, vcProtected])
    PROPERTIES([vcPublic, vcPublished, vcProtected])
  }

and use this code to kick Setter:

class procedure TInterfaceMethodInvoker.InvokeMethod<T>(const AIntf: IInterface; const AMathodName: string; const AValue: T);
var
  LObj: TObject;
  LRttiContext: TRttiContext;
  LRttiType: TRttiType;
  LRttiMethod: TRttiMethod;
  LValue: TValue;
begin
  LObj := AIntf as TObject;
  LRttiContext := TRttiContext.Create;
  try
    LRttiType := LRttiContext.GetType(LObj.ClassInfo);
    LRttiMethod := LRttiType.GetMethod(AMathodName);
    LValue := TValue.From<T>(AValue);
    LRttiMethod.Invoke(LObj, [LValue])
  finally
    LRttiContext.Free;
  end;
end;

#12 Language » Does anyone know how to update value of Interface property with RTTI » 2020-01-10 05:59:53

TPrami
Replies: 2

I've got few interfaces I need to update, they are not inherited from common ancestor (Would have been too easy). They have properties with same name, and datatype.

So to save tons of repeating code I could use RTTI to update the properties by name. Sadly did not find any good example on RTTI and Interface properties.

If someone has code to donate or point me into the right direction, I would be very happy camper...

-Tee-

#13 Re: mORMot Framework » Anyone up to doing some mORMot tutoring (for me)? » 2019-06-06 05:38:32

macfly wrote:

But... Which programmer likes to talk, interact socially?

- I'm just joking, guys smile

I agree with your idea of creating a repository where everyone can test, learn, and teach.

I was thinking the same, for a couple of months, then I thought there is bound to be one that is exception to the rule.

-Tee-

#14 Re: mORMot Framework » Anyone up to doing some mORMot tutoring (for me)? » 2019-06-05 06:35:08

At this stage it would be too much of an question, I could open up the repository, maybe, and then someone could check it out.

But it would not be interactive way I would I'd liked it to be. Also I think it would be fun to chat with fellow programmer from somewhere else anyways.

-Tee-

#15 mORMot Framework » Anyone up to doing some mORMot tutoring (for me)? » 2019-06-04 07:07:34

TPrami
Replies: 4

Yellow,

I'd like to do something completely different at home and I made an start with mORMot some time back, but did abandon that hobby project. Then I basically took that and started new one, but like the first time have serious doubts are my design choices OK. and mainly are they sane in perspective of mORMot.

If someone is willing to sacrifice some of their free time to chat with fellow coder and check my mORMot doodles out, would be more than happy.

I understand that most of you would not like to do it free, payments would most likely be bigger hassle than the money I could spare, for most. Not saying there would not be any kind of compensation but not as default, at least now.

Please don't bash me about this message, I've been thinking of sending this message like month or two now, so it is not easy to ask for help either big_smile

-Tee-

#16 Re: Source Code repository » Couple tweks to two unists » 2016-04-24 15:36:14

Huh, Long time no see...

But I am back.

Even the very latest will hit to that same problem. It might depend upon Delphi settings (Maybe you can get around that in Delphi side), but at least in my configuration it always fails to compile that.

With default settings latest Delphi versions does not like few of the Units without the UnitScope. Winapi.Windows is required and some other also, can't remember which ones

-Tee-

#17 mORMot Framework » Good tutorial how to make Client app with VCL or Firemonkey » 2016-01-28 07:08:21

TPrami
Replies: 0

I've mainly seen web-stuff and very trivial samples that are not too smart, like Edit1.text := LPerson.Name;. That could be done, works for sure, but seems quite labor intensive way. Totally automating would be most likely out of the question because not all Forms would show TPerson (for example) same way...

I could possibly use LiveBinding or similar...

What would be smartest ways to make GUI app (with either Delphi GUI library).

mORMot has been around some time now, there must be some solutions for it. I've just seen blog posts and so mainly on server side code and so, but not the client code that would be kind of production ready. Many cool looking web-client demos have seen tough... Tried to search document of GUI but found only couple very short paragraphs with couple images.

Asking mainly that I do not know enough of mORMot and my solution would be inferior or plain stupid. Or there would already be solutions for all I would ever need smile Found couple hints of VCL stuff some base form classes and edit and Grid... (Just did quick search on the code last night)

If there is no common library/helpers for VLC and/or FireMonkey GUI development, then we could start to design one.

-Tee-

#18 Source Code repository » Couple tweks to two unists » 2015-10-19 16:19:22

TPrami
Replies: 3

Hello,

had to add couple tweaks for D10Seattle

Synopse.inc

    {$if CompilerVersion >= 23.0}
      // Delphi XE2 has some cross-platform features
      // e.g. {$ifdef ISDELPHIXE2}VCL.Graphics{$else}Graphics{$endif}
      {$define ISDELPHIXE2}
      {$define HASVARUSTRARG}
      {$define HASUNITSCOPE} // <- XE2 should be first that has UnitScope-feature
    {$ifend}


SynLZO.pas

implementation
...
{$ifdef MSWINDOWS}
uses
  {$IFDEF HASUNITSCOPE}Winapi.Windows, {$ELSE}Winsows,{$ENDIF} SysUtils;
{$endif}

-Tee-

#19 Re: mORMot Framework » BaaS with mORMot » 2015-09-01 04:27:14

Yeah, thanks.

I've heard that you can get hosted Linux (And even Windows) for very cheap from some places. I am not sure which vendors to look for and what the price would be.

If anyone has good choices for mORMot users for server hosting, let the rest of us know. #SharingIsCaring wink

-Tee-

#20 mORMot Framework » BaaS with mORMot » 2015-08-31 10:47:16

TPrami
Replies: 3

Hello,

I was thinking that it would be kind of cool to have BaaS-support for the mORMot. To have central data storage when you can't have server of your own, and hosted dedicated or not virtual servers are Overkill or too pricey?

If there already is the way to achieve this, I am all ears smile

-Tee-

#21 Re: mORMot Framework » mORMotDebuggerVisualizer (The start) » 2015-06-16 10:30:41

Thanks...

It could be easily Extended to cover more types of the mORMot uses. But even this was very helpful

-Tee-

#22 mORMot Framework » mORMotDebuggerVisualizer (The start) » 2015-06-16 08:10:58

TPrami
Replies: 3

https://www.dropbox.com/s/w3cw04t48473g … er.7z?dl=0

Feel free to use and/or append to Lib and extend if needed.

It'll visualize
  - TTimeLog
  - TModTime
  - TCreateTime

C++ support is nto there (Just code structure to write the Support later)

Helped me to track some bugs in my project

-Tee-

#23 Re: mORMot Framework » Slides introducing mORMot's architecture and design principles » 2015-06-03 04:38:02

Not a Free one... Here at work they use Citrix, which have subscription  based model.

Here is some reviews : http://www.elegantthemes.com/blog/resou … nd-the-web

Sadly many you have to pay something like $80 month subscription, don't know if they have some other price for single use.

IndieGoGo (etc) and have those webinars when people pay, I am willing to pay for sure. Who is with me wink

-Tee-

#24 Re: mORMot Framework » Slides introducing mORMot's architecture and design principles » 2015-06-02 04:57:37

This Video/Webinar is very important because of the Process.

Making small program and preferably enhance it in series of webinars. To further see the process.

It is like going into Paris and into the Louvre, look all the paintings, but it would be much more interesting to see how Leonardo Da Vinci actually painted the Mona Lisa.

It could be similar to FishFacts, and add some features to show off all the Good features of mORMot. And to actually show whole process from DataBase to the component on the screen.

Like I told in my post, because of mORMot flexibility and set of features, you can also easily make App that has worst possible structure smile

-Tee-

#25 Re: mORMot Framework » Slides introducing mORMot's architecture and design principles » 2015-06-01 09:59:00

(and I know it is not trivial task to make such video or keep webinar of it, but I know it would open the mORMot up for many people way better than few static demos)

#26 Re: mORMot Framework » Slides introducing mORMot's architecture and design principles » 2015-06-01 09:50:58

Hello,

I've been pondering that would be very helpful that someone would make "full" mORMot app on Youtube. Like Fisfacts with couple more features to show how app should be build from scratch.

IF you look at plain Demo it pnly shows the result but not the process. And YouTube-video could also tell what and why.

Or it could be series of videos how to add feature X.

But anyhow it would  far superior to just to have demo app and the result code.

Later could have WEB interface or Mobile etc.

I think best would be feature by feature Work in progress type of Webinar/Video to see best practices and would also see what kind of work it would be from day to day.

I started one hobby project and did some code for it, but then it hit me that I am not sure at all am I doing this in best possible mORMot way.

Video to go something like

1. Define some basics and units and so
2. Add some basic structure/Tables
3. Add some Data validity stuff Foreign keys
4. Add authentication
5. Add Feature X
6. Add feature Y

Hope this random rambling gives the idea what I would love to see. It could more than less show all bells and whistles of mORMot in one (set of) video(s). Maybe not all, but on app that would have Clitn, server an DB and authentication could be later.

-Tee-

#27 Re: Delphi » Firebird API project » 2015-03-18 10:28:08

Thanks for the info.

I think I go for SQLite then...

Any good DB-admin tool (free for non commercial) for SQLite? (Windows)

-Tee-

#28 Re: Delphi » Firebird API project » 2015-03-18 05:50:45

OK,

I've am just familiar with FireBird and been using it, I like it in a way. I know it is not the fastest out there, but it is very simple to install and start using. FB3.x should be faster, but how much, time will tell. I see FireBird important also because of lot of Delphi code base have been using FB and InterBase for long time and changing the DB server is quite big decision.

For my this particular (hobby) project I am working on any OpenSource and Free DB Server is OK.

Which OpenSource database servers are supported without external libraries?

Main reason not to use Zeos for me that I try to limit the amount of external libraries to bare minimum.

-Tee-

#29 Delphi » Firebird API project » 2015-03-17 11:26:00

TPrami
Replies: 5

https://github.com/asfernandes/fbstuff

Hope that project pays of, I would like to use FireBird with mORMot, and even if the native low level support would be FB3+ it would be OK foe me. (I would not like to use any additional layers like Zeos) IF I recall the FireBird native low level driver was never finished fro mORMot

-Tee-

#30 Low level and performance » LZO vs LZJB Conpression (in ZFS) » 2013-09-18 09:20:29

TPrami
Replies: 1

Hello I was browsing internet and stumbled upon the LBJB algorithm...

There was not too much info on internals on Wikipedia etc (Source is available for sure), but one thing in this article started to sound interesting.

Detecting if stream is Compressible or not, if not then just store it as is.

I have been pondering on tool to write, but there I would need compression that only stores if data is detected to be incompressible.

Is that feature of the (any) compression algorithm or is it feature of code around it???

But article is in here : http://denisy.dyndns.org/lzo_vs_lzjb/

-Tee-

#31 Re: Low level and performance » Delphi doesn't like multi-core CPUs (or the contrary) » 2013-02-06 05:54:12

Hello,

Has anyone tested how multithreaded program will perform if the SetThreadIdealProcessor WinAPI is used.

This sounds good at paper. to allocate cores evenly but let the system do other vice if it knows better... In Real life scenario when the prog is not alonen in the system this could be good (IF some one is also hogging for the resources...).

Never tested my self, but made mental note once that should some day, if someone has now good system to compare, not setting any affinity for threads, setting threads to single core, and using SetThreadIdealProcessor, what kind of difference they produce. (Some trivial demo might be too sterile for this)...

-Tee-

#32 Re: mORMot Framework » Performance problem with Firebird » 2013-01-28 10:43:10

OK,

It had info how to go around it, did not see it smile

I was just thinking that this is good to know, because sometimes caching the ID:s in the engine level is not good idea (If there are some other thingys accessing the DB, and you can't control that)...

I had system that looked up the pk values and so at the startup and it tool so long without the proper index... (There was pretty big tables)...

-Tee-

#33 Re: mORMot Framework » Performance problem with Firebird » 2013-01-28 08:54:09

Hello,

In Firebird you need separate index for the Max() statement... Descending I think... (Easy to find with Google which I am too lazy to do now)... In Firebird indexes are Unidirectional (Maybe 3.0 can change this, not sure tough)

If you add the Extra index for the ID field then it should speed up dramatically...

-Tee-

#34 Re: mORMot Framework » Breaking change: SQLite3*.pas units renamed mORMot*.pas » 2012-12-03 19:19:19

Hello,

Good to see that there are some cleanups, but I think it went little bit too fad,

Downloaded latest code (at the leaves) and now some files are missing, it might be release thing, but would be nice to get all latest files from there also. Like now some files changed the name, I need to get rid of old files so I know which files are deprecated... And after reapplying the (zip or what not) content to disk some are missing...

like :  sqlite3fts3.obj

Now I really do not know the best way top get working version. Because if I unzip the latest release I'll have extra files in the my local repository...

Any ways, which would be best way to get the latest files with the 1.18 "prerelease" version to the test...

-Tee-

#35 Re: mORMot Framework » HTTP Server / DWScript » 2012-11-27 11:05:30

ab wrote:

2. Use DWS/SMS javascript compiler to create Client-side code.
This is on the official mORMot roadmap.
We would like to use SMS as client back end, for remote ORM, interface-based services access.

If I recall, the JavaScript compiler is now part of Smart Mobile Studio, and no longer OpenSource.

So not for everyone, which is slight bummer...

But anyways the Fast HTTP-server and any scripting for that would be useful in many projects...

-Tee-

#36 Re: mORMot Framework » Question and feature requests (etc) » 2012-11-16 12:40:33

ab wrote:

Thanks a lot for your input.
Very valuable material here!

Thanks...


ab wrote:

Note that foreign keys are not handled at DB level, but at ORM level: when you delete an item, all associated items are also deleted - this is the CASCADE way. RESTRICT is missing. This is only one way of doing it, so we may have to handle it at the DB level, if possible.
Potential issue is that it should work also with no SQL DB back-end, e.g. for pure in-memory tables.

Yes...

Way to create foreign key hierarchy between those  for those tables exist in the DB and maintaiunin/creating them from Delphi side (needed/possible) would be quite good life insurance.

It is very difficult to start fixing the DB after you've put something garbage in it... If your (user) code contains bug and you modify DB with wrong ID's you are big trouble...


ab wrote:

I understand your concern about TSQLRecord.
Implementing lazy loading and such is the problem.
You should consider creating your own instance field in such case, with a getter/setter at the ID.
A possible enhancement could be to optionally create the TSQLRecord instances, and handle the ID from the instances, and make a JOINEd query, just like many-to-many relationship.
But it could be implemented in the future, since there is something similar already working for TSQLRecordMany.

Yes...

This might be the Right way to go for now...

Building factory, that supports all lazy load and so, would be quite difficult, maybe...

But Still i think that would be the way to go, way or other...
´....


btw... for us newbies would be good to have simplest possible demos to tinker around, to show what is to correct way to do certain feature.

Like one to many etc relation ships... Looking from documentation might take too much time and usually contains information which is not relevant on the Simplest possible solution (Or other way around maybe, documentation would bee too vast if all examples and code snippets would contain ready to run code...)


I wold also stress the importance of having GUI support maybe we users could start project on that, it would use Synopse code where it would be smart, (Like serialization code must contain code needed to get properties and fill them back again).

I would think that it should have few key features (Not too carefully thought out, so it might not be the optimal plan).

1. Fast
2. Easy interface (self explaining)
3. High level (Fallback) code formatters and parsers
3.1 Possibility to override the formatters and parser for different needs (Like Double might be money or so)
3.2 Possible to setup  parser for single property or some larger group
4. Possibility to register Mediators (The UI component handlers, I think they are called mediators smile )
4.2 Maybe single source file for mediator and maybe some standard collections for components that are in Single standard Delphi unit.
5. Some neat way to inform user (configurable and way to disable) that the value is not valid
5.1 There should be Regular expression validators and way to use something else also (Delphi code)
5.2 Possibility to update at least the regEx validators from the server side
5.3 Auto correct feature would be sweet. Some trivial would be that entering 0.10€ would be converted to 0,10€ automatically on my locale. It is very annoying if the UI will not help such trivial stuff, but again this should not be forced, and maybe again some neat way to inform user...
5.4 I've made some demo lib for some kind of value validation which used regular expressions, and it used some predefined background colors when possible, and some code I've found somewhere to pain subtle frame around the component depending is the value correct or not. It was few years back so I do not remember all details...

So what do you think? Would we able to start collaboration project on this??

-Tee-

#37 Re: mORMot Framework » Question and feature requests (etc) » 2012-11-16 12:04:44

Hello again...

just remembered I had stored couple links for the later...

http://www.slideshare.net/quipo/trees-i … esentation

Hope this helps...

#38 mORMot Framework » Question and feature requests (etc) » 2012-11-15 13:23:06

TPrami
Replies: 6

Hello,

I've been evaluating the framework for little bit and some my impression so far.  (Quite a lot of text, I know big_smile )

Somethings is possibly I do not know enough, I've been looking the demos and browsing the documentation, but I might have missed the information... And there are my opinions and I just like to bring them to table, to prove me right or wrong does not matter, just to make framework better and more information available...

1. To be sure that everything works and if some logic is broken (Delphi side) Db should have Foreign keys. I know I could just add and manage them at the DB-level, but I would love to handle DB-agnostic way at the Framework level. If I accidentally mess up at Delphi code the DB would prevent then the garbage data to appearing into the DB. whic might be very very difficult task to correct. So I would like to set up it at the same time while I make the Model for the DB into the Framework.


2. Mode should also have more information, I think it should have the relationships of the Tables/Objects (The foreign key information). Which fields map to each other. This could then manage on the Db-level if permitted to do so. Also maybe the natural Primary key or the Data, (or I am missing something here). Because now there is always ID as primary key, but it might not be very logical way to mode the data into the Db. If Framework depends on it, but I would like to have some index/unique index feature into the mode, where I could lay ot the mode which record actually is unique. Also this infor could be used to enable easier high level queries (Like I talk in the part 4.)


3. For now biggest thing is that the  TSQLRecord as property of TSQLRecord.

like

TDistrict = class(TSQLRecord)
end;

TAddress = class(TSQLRecord)
  ..
  property District: TDistrict ..
end;

TPerson = class(TSQLRecord)
  property Address: TSQLRecord
end;

I know I could to that, but the fact that the properties are not actual object instances is worrying, easy to mess it up because framework forces to code nonstandard way.

I really can't understand why this is this way. I would think that there is way to do this even in the older Delphi versions somehow. Maybe it would need some coding/TSQLRecord. I would live with some

TPerson = class(TSQLRecord)
protected
  procedure CreateObjectProperties; override;
published
  property Address: TSQLRecord
end;

Only there should be some way to get it initialized. But the fact that I have object property that is not NIL and it is actually not an Object I do not like that. (Changing it will change the existing code quite much, but it would be change to the better IMHO).

Maybe better yet would be to use some kind of Dependency injection and/or factory for this... So would have to just register it once and it would be taken care of...

There might be some underlying thing I do not understand or I am missing completely, but this kind of change alone would do very good indeed.



3. I am not sure but I think at the framework level should be helpers for the complex Db structures. More than less Tree like structures and so on. Because setting those up and having all the Queries for them Object and Db structure. I think is is where Db-apps get very complicated easily.

Think of an Tree structure and each node would have multiple items liked into it at other table(s). Then you might have logic that should all from selection up, from selection down, at same level etc. I am not the Db-guy, but what experience I have, is the SQL get's very complicated very fast. And I am hoping to get far as I can from the SQL after it is even slighly more complicated that select * from Person where ID=1.



4. I think that the Framework is still too close on the SQL at the where clauses. It is the SQL in my opinion.

Fluent interfaces are one solution but I think it can be as Complicated as any, but would get make 100% db agnostics, because if I recall like string and date etc handling can be different at different DB back ends if there is no some abstraction framework level.

I would like more some kind of other solution this where caluse also. Maybe I could register the queries with some tool for each TSQLRecoed (etc) and the tool would write the code for me. Like (Not very much thought on this but something like this)

TPersonList.Create(const AEmailAddress: string);

To make API much of Delphi code and none of SQL if possible... I know I could hand code this right now. But so does have to eveyone. just the idea of getting more ready to run stuff out of the system. Writing lot of trivial code and maintaining it also is some what error prone... Many bugs are at trivial pieces of the code which you do not concentrate so hard, because you know it is so simple smile




5. Some kind of GUI helper would be very very important. Like the Live Bindings now in the new Delphi version. It could have Regular expression validation and/or just Delphi code shared (The Model) level. Which possibly could at least at regular expression flavor could be updated separate of the Client Change.  (No need for client Update). hcOPF has quite interesting stuff for making GUI programming easy and in same time separating the GUI and your own code. Quite simple program easily have tons of the code for GUI handling only. (Need lot of work I know, I have some demo which I could donate for inspiration for Validation code). And for Most part would be cool to have possibility to easily set up the Object property to the Component. And data would get displayed as defined easily. And mainly easily updated also. As I think some old projects I've been looking at, there are so much code for the GUI also. And I think the Delphi standard Db-Aware way is not good, not even close. But ORM-style way would need powerful tools to get the data displayed and edited and so...

Think of some kind of tree structure in DB and showing it and show the list of data in grid to depending on the Tree selection, then maybe editing the Tree Structure and edit and/or move data around and so (Which ever is permitted in the app) this alone would be very big. And if we all make it from the scratch it is very much work. I am not saying Ab should solve my all problems. (We users might also pitch in wink ). But for this kind of Framework I think anyone who is willing to help  do have to have some directions and guidelines to go by, so everything would stay consistent and would use underlying code in optimal way.

....

I think this framework is little bit kind of "Engineer-code". If you know how it works and been using it it is very good. I think just bringing the level of expertise needed more down (low level might be there or not doesn't matter would be better. To have tools to make things much easier. As for now it solves maybe the biggest part of the puzzle. and some things that is troublesome to write and make effective (Caching of any kind effective and tight data transport for client server communication and so...)

Also I would like to see the framework refactored in few smaller chunks to have more easy access on some part if also part of it is needed for some project. Like BigTable is... Would think the JSON parser and forming and Serialization from objects back and forth. And maybe some other parts of also (Made similar suggestion at somewhere on the forums some time back I think)


-Tee-

#39 mORMot Framework » Small error found... » 2012-11-01 07:26:54

TPrami
Replies: 1

Hello,

function GetCardinal(P: PAnsiChar): cardinal; overload;

at SynCrtSock.pas don't like if project is compiled with Range Checks on...

I think it would be best if all code depending the Range; overflow or IO Checking is off on project, will handle it it self with compiler directives. In other words, code should work as expected regardless of the Run time error-settings or any other compiler setting...

-Tee-

#40 Re: mORMot Framework » Highest performance when adding a lot of records to Oracle » 2012-07-13 06:42:41

Just to give some feedback... (And some more than less of an Off topic stuff smile )

- "You have to inherit from TSQLRecord, and can't persist any plain class";

This is just a problem (IMHO) if you are trying to fit mORMot to old program architecture. New one you can live with this, I think and most likely this decision makes many things better (at least I think it would be easier to at framework level this way).

So why to complain? I see not big reason to do so...

That is why other kind of ORMs provide a way of mapping classes to tables using external files (some ORMs provide both ways of definition).

Files are Evil. Nice to give some non programmer (DB admin or program architect) job to do mapping with an XML-file etc, but this makes debugging really pain in the *rse... If mappin is done in code it is very easy to debug.

....


And last something my own ideas/rant...

I've tried to use little bit of the RemObjects Data Abstract, and I think it is good product for what is designed for, but falls short in many aspects.

Even if you are DB-expert (which I have been lucky to work with) are in more than less trouble with pretty simple SQL (By simple by I mean that what it does, not what it looks like). With AQL you can do what you like or know how to do. But very soon you have so complex SQL in your hands that it makes your life

My dream would be that I define the SQL sent to db-server with debuggable code. Best would be the way to chop it in pieces some how. Doing some queries with Ro-da the code was starting to be more than less as complex as the SQL, which is not good.

There should be tool that would simplify the process significantly.

Like defining the Query in a way that it is in logical parts, not just massive Fluent interface mess, which is very close to produced SQL. All the complexities of SQL should be hidden (I have no very good idea how it could be done), because if you can say something like.

1. Fetch these columns in these tables
2. the relation of these tables are ones I give you here
3. limit the result like this.

If you write an SQL for this, maybe join of an two tables, it already starts to be unreadable.

I was pondering while back, some kind of query builder, which would have two modes. the developement mode which would do most of the process in the client side. and programmer could analyze the resulted data more than less visually, but also by writing some kin d of unit tests or helper methods. (if data is known it would be easy to define cod that loops the dataset trough and does some tests on it).

And after you've debugged the client side part of it and it works, then it could be set to build the final SQL which does the complex SQL and let the DB.-server then return the just the data which is needed.

Because in some cases I've been thinking that time it takes to build these SQL's, would be cheaper (with not so good performance) to just load the bulk data (if not way too big) and do the filtering in Pascal-code at server and/or client level. Mainly because it is very very difficult to find the reason  why this and that behaves oddly in the SQL, but very easy to look trough the any kind of Dataset in Pascal code and define few if clauses and put needed rows in the other set of data. Might not perform super well, but at least you would feel that you know what is going on big_smile

Actually we did something like this, for static data, we made Hash tables of objects (of DB rows) with certain parameters and it was really  easy to figure out why something was not working as it should.

In few words what I am talking about is that easier it is to define the what data is going to be fetched from the server the better. I think even by making some Cached tables on the serverside which you make using pure pascal code is better than have monsters f queries that takes lot of time to change/develop and/or fix...

-Tee-

#41 Re: GDI+ » GIF, TIF, PNG and JPG pictures TGraphic read/write via GDI+ » 2012-07-12 07:39:19

Hello,

Would it be possible to make SynGDIPlus (if not already) dynamic so it programs without GDI+ (Old ones), would not crash... So program could disable some features dynamically or inform user, to try to install GDI+ (or someting similar)...

I have made dynamic version of some Gdi+ Delphi implementation, but seems that it will not compile in D2010+ so, would like to have some implementation that would work for DD7 and D2010, before we can jump away from  the D7.

-Tee-

#42 Re: Low level and performance » Circular reference and zeroing weak pointers » 2012-06-20 05:45:10

Hello,

Would it be possiblöe to refactor this functuionality out on some Commons unit. To it's own entity, so it would be more usable in programs that might not use mORMot wink

There are some cool stuff in mORMot, but could kind of publish some of the stuff in it's on entities, so they would be easy to use in app that will not use the rest of the library. Mainly the problem is that the unit name would not tell the other programmers the reaon why this mysterious SynSqliteMormotCommonsGlobalUtils.pas is included in the uses clause wink

Just my 0.02€ wink

-Tee-

#43 Re: GDI+ » Code Changes for SynGDIPlus » 2012-04-02 04:31:38

Hello,

I would like to see the Dynamic loading, so I could check like

if SynGDIPlusInstalled then
begin
  // GDI+ Code in here
end;

Because sometimes we have to deal with very old computers in some lines of business. So this would make to support GDI+ in some places in same code.

-Tee-

#44 Re: Low level and performance » How to write fast multi-thread Delphi applications » 2011-09-23 05:10:43

ab wrote:

This is a nice idea.

Such a structure may be able to handle cross-thread, RCU feature in Delphi.

With operator overloading and a record, it could make sense, especially on newer Delphi versions.

Even if the "+" operator is not so easy to define for multi-concatenation, if I remember well.

But in some tight spots just having the some kind of generic (not <generic> wink ) class would help a lot.

other thing I've been thinking of is the "multithread data" container.

Think of web server cache.  You got the data cached in streams and you pass the data in higher level codee (like Indy) you can't have multiple readers at same time.

Streams are handy but you can't read them in multiple threads.

It would be cool to have some data storage that you could have "Stream adapters to" which would handle the passing into the higher level code (and custom code of course could use the lower level container directly).

I think that plain reading the memory is thread safe (simultaneusly) if you make sure that the memory is there and don't change.

I was thinking that is the Data updates, once it is ready it would be available to new readers, and old data would sit there until all readers are finished reading it.

This is just rambling this and possibly to get some kind of comments and verification. I've been thinking of some server code, which would have some more than less static data, so some way like this would be efficient way to cache it. So I would not need to Lock on every copy from the Cache.

Maybe cache like this would be usable to others also wink

-Tee-

#45 Re: Low level and performance » How to write fast multi-thread Delphi applications » 2011-09-22 17:52:15

Hello,

I think my English was not good enough to describe my idea. smile

My idea was to get rid of reference count by making simple class that will hold the string (or array) in plain memory area,

Pointer and GetMem kind of solution.

To reason for the Wrapper class is that using pointer and getmem is error prone to use everywhere.

So the lightweight wrapper class to hold reference counted variables and you could then pass it around and copy other container, without reference counting.

This will not solve all the problems, but would help in some cases...

-TP-

#46 Re: Low level and performance » Delphi doesn't like multi-core CPUs (or the contrary) » 2011-09-22 11:06:04

andrewdynamo wrote:

No, in fact it is much easier/simpler than ScaleMM2 (I did not like the complexity of ScaleMM2)

When we can test drive it wink

.-Tee-.

#47 Re: Low level and performance » How to write fast multi-thread Delphi applications » 2011-09-22 11:03:18

Hello hello,

I was just thinking that because in many Cases the using the String will cause problems in Multithreaded Delphi program.

And sometimes you only pass the string around and not actually do anything with it. Like some kind of metadata with string information.

And that causes lot of Locked operations on low level, kid of invisible to programmer. Just having the strings around, not actually using them most of the time.

Then I started to think that maybe we should have some container classes to store those kind of variables/data.

Like some simple buffer/storage class for String. It would not use string internally, just an piece of allocated memory. And it should/could have some kind of non locked copy method. etc.

This way the having the String data around, and maybe passing it along would not cause so much Locks. But it should have some kind of wrapper class (maybe for Dynamic arrays also). To make it safer and less error prone.

This is just an idea to get rid of the String related locks...

Even better ideas are more than welcome wink

-TP-

#48 Re: Language » Multi-threading and Delphi » 2011-08-30 04:30:21

Hello,

Can't use OmnithreadLibrary, because I am using D7.

-TP-

#49 Re: Language » Multi-threading and Delphi » 2011-08-29 10:50:55

Hello,

Thread safety is one thing.

But how you would move data or signal between threads.

I think the

Lock;
  CallUpdateWithData(Data);
UnLock;

is little bit too Heavy in many cases. Maybe sending messages between threads? But how much that will have Overhead (time)??

TSimpleEvent is easy if you can just wait for the processed data to arrive, but it is not that good always. But it will not provide the data.

I've been thinking that maybe messages would be way to go, the the thread would not lock each other all the time...  also I think that thjere should be simple (set) of class to be wrapper around the message sending (etc) API.

-Tee-

#50 Re: mORMot Framework » SynDBOracle: Open Source native Oracle access » 2011-07-11 17:10:50

ab wrote:

SQLite is already integrated, since it's the core of our mORMot framework.

I know, I just listed it as important SQL engine/Server etc. to support...

ab wrote:

MySQL and FireBird could be added, just like I added the native Oracle version.
I suspect you can reuse a lot of existing logic of the SynDBOracle unit for those two candidates.

OK, maybe someone could help here.  Maybe I have free time, but I am not sure am I good to produce code that is fast enough...

ab wrote:

But honestly, I don't have time to do those port yet... I needed Oracle port because of Oracle's OleDB provider bugs (and using OCI without installation) for applications I'm working on... But I don't need MySQL or FireBird in the close future...

Yes, you need to follow your needs, time tables and road maps.

This is so interesting project that I am just hoping that it would gain more people to help you with it...

-TP-

Board footer

Powered by FluxBB