Sunday, March 15, 2020

Delphi monthly round table!

Meetings and shows are canceled all over. The next Apple presentation will also be online-only.

Let us take this as an opportunity to put a new format in place. Yes, of course, we could do webinars. But this is not so interactive besides the Q&A session at the end.

I would like to try it differently. We could use TeamViewer Meeting or just audio-only. One way to go is with a TeamSpeak Server. I have installed this kind of Server many years ago.

At the moment I'm collecting topic.

I've already talked to Jim about this and perhaps we will join with other MVPs to a monthly round table.

If you are interested please leave a comment and stay tuned for the timetable of events. This will be online in a few days.

[EDIT 16.03.20]
This is open to everyone - It would be nice if some MVP's are also online, perhaps to answer your questions. If YOU can answer a question - you are welcome to answer any question, too!

[EDIT 17.03.20]
I forgot: TeamSpeak-Server is up and running.

IP: ts.delphiprofi.de
Password: EMBT



Thursday, March 12, 2020

ProjectH - Your solution for Project Management.

8 Weeks ago I did a survey about project management software. // Still open

The answers were as expected. "Nothing on the market works for me" was the common answer.

I've googled, I've tested some of "them" and this is my result:

a.) it is too simple and didn't fulfill my needs
b.) it is to complex and overkill for a single person or a small team
c.) perhaps it fits, but it has a monthly fee that is too high - I'm looking for a one-time purchase.
d.) it's only a website

And of course a combination of a-d most of the systems are b,c, and d. Perhaps some big companies would pay the "Enterprise" Solution for $1500 US/month, but that is not my goal.

Should it be open source or paid source... The survey ration was 50/50. 80% are not using any tool at the moment. There are 6 developers at the moment with interest in helping me build this kind of software. But 50% only wants to help if it is an open-source project.

Perhaps an idea would be to try to finance the development over Kickstarter or an equal portal, but I never tried this and I have no clue if it will work. It would be perfect if we had some kind of software, that is able to calculate the costs of development or can show how long it will take to develop this kind of software. ;-)

Let's forget about the costs or the time it will take. I think I could do my development much better with an App that can give me a good selection of items based on some rules. hmm... Here are some examples.

  • I have just one hour until the next skype-meeting. "Hey H, give me a small topic that could be completed in less than one hour"
  • I want to develop a topic today that is needed for more than one project and/or more than one project depending on this (like a PayPal interface). "Hey H, give me the most needed topic for all of my projects"
  • I'm not creative today. The best thing to do is not programming. "Hey H, give me a topic without programming" - "You could write some documentation for the MVVM Framework" - oh crap, I hate writing docs... But whatever.
  • I could get a new assignment developing an app. By predicting the time I get a sum of 240 Points. "Hey H, give me a release date if I add 240 points to my workload while suspending private projects". "You are able to start the new project in 3 weeks and it will be ready in 8 months, not harming any other work-related projects"

I know I'm dreaming... But at the moment EVERYTHING is a guessing game and I'm sure I could work better with some kind of project management tool.

So, I've got a few things I would like to see in this app. It has to be standalone Windows/Mac/Linux Version able to use a REST-Service for data storage and data exchange. A mobile app would also be useful. Perhaps some kind of time-tracking device, like this cube thing you can rotate on your desk. Or just use your phone with the app and some buttons. (Working, on the phone, taking a break)
There have to be points associated with items. Of course some graphs like Gantt or Waterfall. perhaps like in mind maps. Milestones or release/update prediction. An Interface to a bug tracker and perhaps some hooks to git or mercurial. 

I'm still collecting. What do you have in mind, please leave a comment.





Wednesday, March 11, 2020

Development environment and the ASUS support.

I spend "some" money on my PC to get a reasonable speed for my work. I didn't had the time to build my last PC so I ordered it over the Internet. Overclocked 4,5 GHz water cooling Raid 5 disk array for storage and Raid 0 for the boot drive... 32 GB RAM.

Top on the list at this time.

I upgraded my system with a new RAID controller and 4 SSDs in Raid 10. Wow this was an improvement boost. With this upgrade, I've started to work only in a VM. This was the best decision I've ever made. A little later I got the first 1080TI, which was available here in Germany.

I saw some videos about M.2 SSDs and one from Linus tech tips that trigger me. The ASUS Hyper  Card 16x. With four M.2 that has to buy my next upgrade. ~ 10.000 MB/s

I ordered this card, 4x 2TB M.2 and... Total disappointment. Only one M.2 showed up, the other three aren't working. I called the ASUS hotline and they told me: You must have a Z390 Board to get all 4 chips running. 

Since my Rampage IV Extreme-Board and CPU was running fine - I didn't want to buy anything new again, but over time, I finally ordered all upgrade parts.

- ROG Maximus XI Extreme
- i9 - 9900K - 5.0 GHz on all cores.
- 64 GB of G.Skill 3600 DDR4 - 17-19-19-39
- New water pump (last getting old)

Board, CPU, RAM, works perfectly - nevertheless, only 2 M.2 showed up... Next session with the ASUS hotline - no this config does not work. Great.

So I used the 2 - M.2's on the Mainboard as a RAID 0 - works nice. (not hardware raid). The benchmark was ~3000 MB/s read/write.

After 6 months I got an error from time to time, on one M.2. Windows could always reactivate the raid, but this is always a bad sign. This time I ordered another card: "ADWITS Quad-M.2-NVMe-SSD-PCIe-16x-8x-Adapter" it should work with every Mainboard and could provide 6500MB/s. I also ordered 4x New Samsung 970 EVO Plus 2TB. I had to order them from different resellers. Btw. it was a good time to upgrade my 1080ti to a new 2080ti.

Good news: The card works - bad news: not all 4 M.2 have the same size. 2 have 1862,89 GB, 2 have 1863 GB. That's why Windows is unable to bind them in a RAID 5 (or RAID with parity as Windows is calling this). But a RAID 0 works fine and I got 5550 MB/s read-write speed on this huge 7,5TB formatted "disk"... Not bad. VM and Delphi is working fine.

I chose  XMP II for the RAM and enabled the CPU clock-AI. It tuned down the clock a little bit - I have no idea why because it runs stable @ 5 GHz all cores in all my Tests. Since my system is running 24/7 @ 42° C or less - I'm fine with 4,8 GHz.

So far so good - Camtasia is now using the GPU for rendering. So let's do some tutorial videos on the FDK and the new D.MVVM framework.

Monday, February 24, 2020

Live Youtube, Chat, FDK & MVVM...

Since 2017 I have this topic on my todo list:

- Create Youtube Video's

After my FDK was ready for release, I wrote some kind of little documentation and some demos, but everything was a little too "short".

The other Idea was to convince people to buy my Framework. While the first customer was waiting for the version, I had to develop my fancy setup/update/shop installer. And also the local service-desktop-software to handle the versions, upload, download and payment. Too bad, at this time my MVVM-Framework (version 2 or 3) was not as good as my "final" version today.

So much to do, but no time for videos. Last time I uploaded a video to my channel is 6 years ago...

Now as my MVVM-Framework is working,  I'm able to refactor my Service-App. I also had to improve the invoice print. The first time I'm using the PDF stuff from my friends at Gnostice.

While talking to Craig Chapman he asks me why I don't do live streams... Never tried, beside one round table with Jim McKeeth. 

A live session only makes sense to me, if this is announced in advance. If nobody is watching  - especially on my channel with only 35 subscribers (at the moment) - this is no fun. Users must also be able to chat with me... My Chat-Software with WebSockets is not ready at the moment, so I installed a free Website-Chat-Script from tawk.to on my homepage.

Perhaps I'll start with some normal tutorial videos for FMX my FDK and my new MVVM-Framework. Then pre-recorded tutorials with a Q&A session like the webinars.

In any case - please subscribe to my channel and hit the bell icon for notifications. If I'll get enough subscribers, I'll try to do the "live-thing" and we could also have friends like Craig or Olaf joining it.

Wouldn't it be great to have a monthly round table?

Please leave a comment! 

PS.: I have a TeamSpeak-Server running for this kind of round table since 06.10.2011. Only used this once for Delphi-Talks...

Wednesday, February 12, 2020

Delphi 25th birthday.

Once Upon a Time...

A young developer programming every day with this Z-80 book on his knees. Z80-ASM was a third language he'd learned. First was a ELAN on the EUMEL OS and of course Basic. By selling his first Basic program to a local computer dealer ( a Paint like program ) - he was able to buy his first color monitor and a floppy disk drive. His first ASM program was FL-DOS-800 a Disk Operating System to load, read, write erase files on a floppy disk and also a Hex/ASCII Disk Editor. Using only 1000 bytes of memory it fits perfectly below the build-in ROM of the MZ-800 and boots in just 1 second.

Side note: You can see even in the year 1986 he loved three-letter names for applications and F has to be the first letter... ;-)

With the money from his FL-DOS-800 he bought his first double floppy drive (2400,- DM ~ 1100,-USD these days) 

With this double floppy drive, he could run CP/M and also his first version Turbo Pascal on his MZ-800. Greetings to Anders Hejlsberg who licensed his "PolyPascal" compiler core to Borland.

While working on exhibitions for a computer company, he got to know the first two customers. He got his job and had to create his first business application. But MS-DOS and MS-DOS-Computer where the sales point, so he had to convert his app from CP/M to MS-DOS. Not knowing anything about this "new" OS. At that time he met "the other" developer at school, who was able to help with the core methods. So it was a good idea to build a company together...

Guess what... These two are still working together and nearly everything they've owned depends on this application, started with Turbo Pascal for CP/M on a 64 KB - Z80 Computer.

In those days everybody was using MS-DOS 3.0 which was able to handle only 30MB drives so if you could afford a 40MB ( not GB, TB ) hard disk. you had two partitions. First guess - this disk space will be enough forever... LOL. And of course only black/white, green or amber with the Hercules Graphics Card.

The Application was still growing and converted from Turbo-Pascal 1 to 2 to 3. Thanks to Borland, Version 4 could handle overlay units, so no problems with memory anymore. (640KB ~ 350KB free). With one of the next Turbo Pascal Versions we could do some tweaking and could compile to protected mode - giving us full use of 16 MB RAM. (Not GB) 

After some tests with Borland-Pascal for Windows 3.1. "No, thanks" we'll stay on DOS. Delphi and Windows 95 arrived... A complete rewrite to windows was out of scope in those days and a CRT emulation of the DOS-Screen was just a proof of concept, too slow for the real world. However we were able to show this Version to our customers, and our competitors had a heart attack. (First time)

Windows 95 where the break trough and we had some time to rewrite "stuff". Not everything at this time, but enough to show the first Windows version of our software - compiled with Delphi 3.0.


This was the second time our competitors had a heart attack. We were years ahead and also the first company in our market segment with a windows version. Everybody else was still on DOS.

We had many clients at that time, not willing to switch to Windows. So we had to compile our DOS Version from the same code base with Turbo Pascal 7.

We kept our DOS Software for many years and also converted the DOS-parts, which used direct memory access to the screen, to a Delphi Console Application. Still being able to compile to "DOS" and Windows from the same codebase. This continued up to Delphi 2007.

It took some time, but with our Windows Version, we got the market lead. 

At every Borland/Inprise/Codegear show, I ask David-I or Mathias Eißing (and it became a running gag over time) could we please have a compiler for the Compact Framework, because we want to support Pocket PC's like the iPAQ and in a good manner, the answer was always "we're thinking about this". This was our first and last escape to C# (sorry about that) but we are still able to use the data collected on these devices in our main app. This was the third heart attack - because nobody had support for these kinds of devices those days. (please, last customer buy a smartphone)

You may imagine I could not wait to get started with the mobile development on XE2, to support iPhones. (Bad idea to jump on this train so early) - I was able to compile my first Version of this app and with XE3 you also could use it. ;-)

After so many years of development, doing FMX was a steep learning curve and ARC was a pain in my a**. I think every FMX developer could not wait for 10.4 to develop FMX without ARC.

In 2012 we presented the first version of our app to our customers.



As the first and only App in our market, this remains a heart attack for our competitors and a persistent headache.

With XE4 we could also present our app on Android. It took a little bit more time to solve every problem, however since XE6 everything works fine. 

The App has grown (255.000 LOC) and got a new design (same on every platform).



Of course this depends 100% on my Firemonkey-Development-Kit. This time the "F" stands for Firemonkey... - believe it or not...

Our Windows application had grown to many million lines of code. We are still using Delphi 2007, but we had to rewrite the core with our own unicode methods. New stuff is compiled with XEx to a DLL also some FMX-Stuff. So we could still uses our codebase. Over time many methods have been rewritten, but I think - if I just dig deep enough - I will find some lines of code just copied from the CP/M Version...

Since march 2017, I'm an Embarcadero MVP, after many years - just beta-testing delphi! (since 6.0).

Because FMX is kind of "still new" to many developers, I help other companies and developers with code-reviews and consulting. If you need help just give me a call or visit my website (delphiprofi.com / delphiprofi.de).

Yes, Pascal/Delphi has accompanied me through my life. If I hadn't been so lucky to make "some" money with my first Turbo Pascal application, Oh man, I should have learned a real job and worked properly.

This is my Delphi story and I hope I can use Delphi for many more years... Greetings to Embarcadero and of course to the friendly people working there - you are doing a great job. 

PS.: Please fix my QC's... ;-)





Tuesday, February 11, 2020

MVVM is just a concept.

It looks a little bit like a never-ending story, but it isn't.

Two things I realized after the "Pattern" is working.

1.) The main part of the implementation was the binding and also the hardest.
2.) With the D.MVVM-Framework in place, you have nothing to write a real app.

What?

Yes, the only thing you have is some kind method creating the chain of Model -> ViewModel -> View and also binding the component properties to the ViewModel. Of course, this was the most work, but creating the flow of the app is also a necessary part. So what? Good question.

First of all, you need some really good startup/connect all/composition thing. That's why we call it composition root. This is the point where everything is hooked up together. At this stage, you can use a service locator to do your dependency injections. 

After your Main-Chain is running, how to do the program flow? How to load the next form from the View or the ViewModel? With a Navigation-Service! How can I fire some Button-Clicks? With an Action-Service! How to create a Main-Menü on the Main-View (without creating any dependencies?) With a Menue-Service. Dialog-Service... What else?

There might be some more services needed. But at the moment I'm able to do anything with a combination of these Services - Like a "You are not logged in" so fire up a Login-Dialog before loading the next Form/Frame.

At the Model stage ORM/CRUD Database stuff would be perfect. That's why I write this also as a plugin for my FDK because everything you need to do with the database stuff is already in place.

If you never tried this yourself, the best approach is to try a sample application. At this point I realized - yes all this framework stuff is just to be able to do a proper unit-testing and after two weeks of refactoring - lol - unit-testing is a piece of cake, after I created some Mock-Ups to kill the visual dependency's.

Before you are able to buy this framework, I will refactor some of my other projects - this real-life proof of concept will perhaps bring up some more needs, but every new project will do this, up to a point where I call it ready for shipment. 

At the start, my release date was February - but as always - other things got into my way. So it is ready if it is ready - sorry no prediction at this time. We will see. I hope that refactoring my other projects to the framework would only show up additional needs and not the need of changing the kernel. 

Any questions or ideas? That what I really need to put into the framework, please leave a comment.

Thursday, January 30, 2020

TDD - I hate if I do not follow my own rules.

TDD or Test Driven Development is one approach for creating new software, modules, classes or whatever you need in your application.

The main idea behind this is to write your unit-tests first and then your productive code. Sometimes you need to change your tests because while developing the business stuff, you get new ideas on how you get the results you need. But this's fine.

Every time I do consulting in other companies or in my Delphi talks, I tell everybody: "Do your test first, because your development is much quicker" - "And you feel better" - "If every test is green (OK) you can ship the application".

There were complicated classes in the past for my FDK - it had taken more than twice the time to develop them if I hadn't used TDD. And yes, if you do the tests first, it will save you time. So far, so good. Of course, I don't follow my own rules 100% of the time. Sometimes it feels like - this is so simple; I don't need a test for this... In most cases, this is correct - not good, but correct. 

Nearly every app has a point where you have to do more complicated things and like to do some unit-testing. Maybe not for the first release, but if you or your users find the "first" bug, it would be nice if you could write a test to reproduce the bug. Then fix the bug and confirm your test with the OK from your unit-test.

Here's the problem. While creating the unit-test-project you notice, that you have more dependencies in your application than expected. Just one little test and you need to link 90% of the app. Horrible! If you've done the tests first hand, you probably had used more dependency injection. Changing that later is a real pain.

And then?

Your first look into your source code - OMG - What have I done... Yes, I found the problem, but are there any side-effects? Home much unit-test coverage do you have?

OK, Frank - Next time write your tests first..!

Yes, this is an old app from the time where I do not have an MVVM-Framework, but this is no excuse!

Site note:   Assert(TThread.CurrentThread.ThreadID = MainThreadID); it Is very helpful if you are using threads - and I hope with FMX you do everything you can do in a background thread! - Because you sometimes use a class or anonymous procedure in an event from a thread, you haven't done before.

Saturday, January 18, 2020

I wiped my development brain!

Holiday time... Brain-wash time...

On my last holiday I had no PC / Notebook with me. Just my phone - of course...

But my fear was to forget the necessary parts I want to develop/fix/build in the next month. So I took a notebook (paper) and a pen and wrote down some ideas.

Every day I had some topics to write down... The interesting part was I found many topics - like new functions for my FDK that could be used in many old and coming projects. Same with a function that I need for an actual project could also fit in an app that I will start in the next few months. I just wouldn't have noticed that from memory.

After some days of reading the notebook and adding hints, there was a point where I read for hours but did not add anything. So I put this notebook into my nightstand and I felt that my brain was completely wiped of development thoughts.

At this point the real holiday starts - interesting - I hadn't had this kind of empty brain feeling for many years.

So back home - I really want to keep this feeling... But how. At first, I only read the topics from this notebook that are marked as "todo first". I did not read any development related topics - so far. wow...

I use JIRA for my main applications as a ticket system, but for project coordination I never used any software/website. (As I mentioned in the last blogpost "Time-Shared Development Part II".

I googled very hard to find an app at a reasonable price, but I found NOTHING. So if you are using a nice software for this use case, please leave me a comment or/and please fill out my survey!

I do not want to fill my brain with all the stuff from this notebook - I really want to use a software like: "I have 3 hours, what is the most important part I could develop in the time frame?"  or "Give me a list of methods I need most for most of my actual and upcoming projects, order by the estimated time of development"  or "Are there any classes I have to develop for the next release of my apps".

I'm really short of doing the perhaps most stupid decision - New / FMX App / Save as "Project H"...

I hope I have enough important things to do and in the meantime find a solution for my project management...

OR

Perhaps you are also looking for a solution and many other developers, too... So we could start "Project H" together... Or you like to buy this kind of software for you or your team... Try to convince me to start this project...

There are 3.5 Mio Delphi developer out there - if just 1% would love to have this sourcecode for x €.

That would help... ;-)

Or my first open source project? Please help me with this survey!





Wednesday, December 25, 2019

Time shared development Part II - or Project H?

A little bit more than 6 months ago I changed my daily work to "time-shared-development".

Spoiler: This was a good idea...

But as I mentioned, I do not use any software or website to track my projects. Ok - JIRA as a bug-tracker for my two main projects...

There are so many "new" words and websites to handle your agile programming, your development team, and your projects. By doing some googling, you really get overwhelmed by the different approaches. Some are looking not so bad, but most of the systems are much too big for some little project tracking. Most of them have no detailed information on the workflow and of course, all systems/websites want your money as a monthly fee. 

I really, really dislike the tendency to do everything in a browser on a website. No, I hate this! That's why I always use an App if it is available. 

The question is, do I need this? I think the "time-shared-development" is still a very good idea, so let's compare the pros and cons.

Pros

  • Work did not get boring
  • Every day a new task in a different environment
  • If I get stocked on a problem, I could work on a different project and wait for a new idea
  • Other projects are not sleeping and are still improving
  • No induction period in projects that have been dormant for a long time


Cons

  • All projects take more time to be completed
  • The progress (next step/problem) of every project has to be kept in mind.
  • Shared code that has to be used or could be used in more than one project can easily be overseen 
  • Problems can be too simple be pushed aside (see Pros)
  • Progress-points of projects could easily get mixed in mind


So two cons depending on keep the progress and/or the actual problem of every project in mind. For two projects it is doable... But how many projects could you keep track of, without any todo-list? At this point, I'm still not 100% happy with this kind of workflow. Should I start project H and start coding software for this task? How long would it take to develop a usable software? Which are the necessary main features to start with? Is a simple text file on the desktop enough? Or an Excel sheet?

OK, perhaps first take a look at the problem. Of course, I use me FDK for every project and as my MVVM-Plugin is nearly ready, I will use this also for my projects. Some projects must be refactored to this new version of my framework. For new features I always decide if this is a feature - only for this project - or should I write this as a generic Class/Unit for my FDK. Many projects have a partial feature that is similarly usable in other projects after minor changes.

For example, many mobile apps storing data into a local database, if no internet connection is available and after a reconnect the database has to be synchronized over a REST Service. This is - of course - included in my FDK (Client and Server). Most of my projects are using this implementation as a start and doing some improvements on top of it. That is fine for Project A, but it would be nice if Project B could also get the benefit of improvements in Project A? But how to code special and also universal for more than one project? Maybe this is possible, but not if you have to keep everything in mind. And here comes project H into play.

I need a perfect representation of all project states and progresses to get an overview at which point I need to developer feature A because Project A, D, F are at a point where no progress could be made without this feature. Because all three projects a evolved as far as possible to the point where this feature has to be implemented, it must be easy to find similarities and every project could use the same improved implementation and only have to do some minor project specifications.   

hmm... if this is not the case I spend hours and hours in developing project H (my version of agile software developing tool, if you did not read part I) without any benefit.

At the moment I have not made a decision. Perhaps you have also some ideas - I would love to read your comments. But don't try to convince me for a web service... ;-)

I've made some POC's how to drag and drop "Features" from a backlog into a sprint, show sprints and points, but I've not tried to draw any Gantt, waterfall or whatever the name is of my final graph...

Of course, if I start project H, it will be FMX to be able to do everything on the road over a mobile device. Did anybody else need this kind of "simple" software? Should I do my first open-source project or try to sell this software? Perhaps it depends on how many developers what's to help me with this project. So again please leave a comment or give me a call...

btw. Happy x-mas





Friday, December 13, 2019

New Style-Designer Software

Hello!

Perhaps you read my post on FB already - if not - I'm planing together with MVP Steffen Nyeland, to develop a new "Bitmap"-Style-Designer for FMX and perhaps also for VCL or to make it work closer together, to create a style that is working on FMX and VCL. (If this is possible - never tried to create a VCL style so far) 

Perhaps you followed my posts about my tests with the current designer.


One problem with designing a new designer is - of course - the result has to work with the RTL. It would be possible to create a new StyleBook component, but the main styling should work with the given RTL. The main focus is to get the software with much better usability.  

If you are interested to work with us please give Steffen or me a call. Perhaps you have a good idea of how the designer should work, but do not have the time to help with the development, we would like to read your ideas. If you are working with the BitmapStyleDesigner and just want some improvements - we would also like to read that, too

Should we design our new designer mostly like the "original" or should we go in a completely different way? 

Without wanting to influence your ideas, this is our ideas so far:

  • new UI
  • FMX-UI for "all" platforms
  • custom style colors
  • live preview 
  • hook for own preview window
  • better documentation! (Where setting A is used in component B)
  • external icon management (load icons and compose "the" bitmap)
  • no more draw a rectangle around every image.
  • use SVG to create different resolutions

There is more, but many parts are still under consideration - we also have not decided if we do this as open-source or not...




Thursday, December 12, 2019

Android 64 Bit device list.

Finally, we have the compiler to do the Android-64 deployment. But do we have 64-Bit devices?

The problem is, even if the CPU is 64-Bit maybe the installed OS is only 32-Bit. Of course, this is only a problem if you care about it. 

If you are using the non-native stuff - the CPU doesn't care and also if it is 32 or 64 bit.

But I like to debug my stuff, so I need a 64-Bit device and I really dislike spending a lot of money on the kind of device, because my daily drive is an iPhone.

Spending more the 300€ for a device just for some debugging is crazy.

If you google for a 64-Bit Android you do not find anything, because nobody cares about this.

It is also very hard to get the information on what CPU and what version of the OS are running. You have to install AIDA64 or some other test-apps.

So if you have the proof that your device is 64-Bit and also has a 64-bit OS installed and costs less then 250€ please leave a comment.

Saturday, December 7, 2019

Lost in Units...

If you start a new project or perhaps the POC of your new project, you normally save the main form and the project file to a sub-directory of your choice.

And then?

How do you name your units or your forms? Do you put your units in sub-directories? Do you have naming conventions?

In the past, I used a "w" in front of my unit name if it was a form. (Winform)  And of course, the Filename had only 8 chars because pre-Windows 95 filenames had this limit...

I hate projects where every unit has it's own sub-directory...

So how can we do it the right way?

With MVVM or I think any other pattern to separate the Forms from the Business-Code you get more units as without or the "Thing" we call RAD.

Comparing RAD with MVVM we get 2 more units (ViewModel, Model) perhaps beyond the Model we get 2 different implementations of a DTO Class. Perhaps one more Unit for a separated Interface-Unit. So in the worst case, we get 6 units per "View/Form". If it is a From that contains more than one view it gets "worse".

I like to have "View/Form" related units together not all Forms in one sub-dir and the modal or the ViewModel at a different place.

If you have a project with 200 forms, with MVVM we get something between 600 and 1200 units. This is a mess if you have no strategy for your unit names or where to put the files.

So where is your limit putting every file in the same directory? For me it's the height of the project tree in the Project-Window. A little bit of scrolling in the tree is fine but if this tree is too big I get lost. So some time in a growing project I have to put files into sub-directories. I hate to do this, because if I need a reference to these units, every unit has to be included in the DPR file or I have to include every sub-directory into my search path.

Let's start with naming.

Since I'm using MVVM I use the "MVVM-Naming" in every project, so

MainForm -> Main.View.pas
Global interfaces -> MyInterfaces.pas
Global settings -> config.pas
Global ifdef -> IFDEF.pas
Application startup -> bootstrap.pas
Application construction -> Composition.Root.pas

Forms are named "XXXX.View.Pas"
ViewModels of course "XXXX.ViewModel.pas"
Models of course "XXXX.Model.pas"

"Just Units" - that are not service-related are placed in a sub-Directory ("no platform") only if they are not related to a special platform.

Platform related Units I have sub-directories like ("Windows","iOS","Android","OSX","Linux");

So my "normal" Dir-Tree is looking like this:


- Artwork of course for all Icons and Bitmaps especially for FMX!
- BIN as Target to resources
- POC for Proof on concepts
- XE10.* for RTL Source file copies (I always have to change some files/parts)
- Tests for all Unittests.
- tools for all these small tools you need to build this project.

For a smaller list of matching units with the namespaces I had - or we had - an idea at our last Delphi-breakfast today.


So please support my feature request :

Thanx!