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 of 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 a software with a much better usability.  

If you are interested to work with us please give Steffen or me a call. Perhaps you have a good idea 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 a complete different way? 

Without wanting to influence your ideas, this are 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 resolution

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 don'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 to spend a lot of money for 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 what CPU and what version of the OS is running. You have to install AIDA64 or some other test-apps.

So if you have the prove 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 mainform 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 implementation of a DTO Class. Perhaps one more Unit for a separated Interface-Unit. So in 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 you limit putting ever 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 to 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 this units, every unit has to be included into 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 ("noPlatform") 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 this 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!

Friday, December 6, 2019

MVP of the Year / German candidates.

Hi!

The election of the Embarcadero MVP of the year has started.

If you like my stuff please vote for me!

Here is the link to Olaf Monien's homepage (Developer Experts) if you like to vote:


This is only for German MVP's every region has it's own system.

Thursday, November 21, 2019

Delphi 10.3.3 and Android 64

Finally here are the news about Delphi 10.3.3.


No more mimimi about not be able to build Android 64 with Delphi.

Also iOS 13 with Dark-Mode support.

If you want to get the information what mode the User has selected, just modify the FMX.Platform.iOS (Copy file to your project directory)

and Copy

const
  UIUserInterfaceStyleUnsepcified = 0;
  UIUserInterfaceStyleLight = 1;
  UIUserInterfaceStyleDark = 2;

and 

function GetUserInterfaceStyle: UIUserInterfaceStyle;

to the Interface section!

Also a ready to use Linux-Docker image on Docker-Hub.

If you have the Enterprise Version and want to Build your App with FMXLinux you can provide empty implementations for some System units.
Of course only necessary if you are using this stuff in your app.

// Empty Implementations
System.Linux.Notification.pas 
System.Linux.Sensors.pas
// Add IFDEF Linux64
System.Notification.pas
System.Sensors.Components.pas
System.Sensors.pas


Tuesday, November 12, 2019

#CodeRage2019 - Fluent Creation of controls at runtime!

The Embarcadero CodeRage2019 (worldwide)!



Of course I had to provide a session to this event with one of my beloved topics:

My FluentCreator!

(Part of my FDK - The Firemonkey Development Kit)

The #CodeRage2019 event should only contains tutorials of 5 to 10 minutes of playtime. So I will provide a more detailed session in the next days on my YouTube-Channel 



(Btw. This is my first tutorial in englisch language - I will provide German subtitles on my channel in the next days and if I find the time I will upload my older sessions with englisch subtitles as well)

Yes, this channel has not seen any new content for a long time, but I will provide more stuff in 2020.

The short Version you can find here

If you want to submit a question to the Firemonkey Multi-Device Design Q&A session at 14.Nov.2019, please click here.

Here is the full list for the FMX-week

Please leave a comment or send me an email if you like to see another topic of the Firemonkey development.

Thursday, October 31, 2019

How long does it take to develop a "complete" MVVM framework for Delphi?

This is a really good question. (Btw. what is complete? We all know a framework is never complete)

Maybe you have a different question in mind... Is it worth to spend x man days trying to develop it? 

Spoiler - Yes!

If I had not believed that it was possible, I would never have started another attempt. 

If you have not read my other posts about MVVM - yes I've been trying this since 2015. (Of course not all the time).

Is this my last attempt? - I hope so - or better, I hope that this is the final version that fulfills all my wishes - as well as yours  (one of which is to prove: Yes, with delphi it is possible to develop a framework with the idea behind MVVM)  

Most the time I had to spend on a better binding structure, studying the source of this unit... Oh boy, I have to refactor this code for better readability.

We all know the MVVM images with the three colored boxes and  the fancy arrows labeled with read, write, binding, propertychange, event or whatever. Everybody starts with this.

Then you google for tutorials or search at youtube. Yes, you will find some stuff, but if you dig deeper and depper into MVVM you have to rethink about these videos. So many mistakes. (of course from my point of view).

On the surface, the MVVM-Pattern is just a guide how to separate the visual parts from logic and put everything in a state to be able to perform unit tests. Is this so? 

Yes, but the devil is in the detail.

And everybody is doing it a little bit different. Then you learn from this tutorials how to do "a" and by reading more and more "a" is suddenly an antipattern and everybody is blogging about "a" is bad you have to do it like "b". Sometimes it sound like the discussions about using FreeAndNIL. (Please no comments on this topic) ;-)

Who holds the instance of a, who can create b and how to perform c? Using the approach from a tutorial or is there better way? - is the better way still the "right" way? - and who decides this? Some experts or MS? What is an expert in MVVM? 

If you are in front of your screen staring at an empty unit in the IDE - I call this 

"The loneliness of development" 

you easily get overwhelmed from all the decisions you have to make. #AloneInTheDark Only if you are using the darkstyle!

My advice - talk to an other developer. Perhaps she/he is not right or has a complete different idea or opinion - that does not matter. Take the feedback and do it your way, perhaps you can adjust your first idea with the feedback.  

And here I am - 3 month into the final version. (only in my spare time I do the MVVM development). It's working - and it is fast - and it is easy to use - and there is (nearly) no code in the View/Form - and most of the necessary (stock) visual controls are already working (no imposer necessary) - and you have to write less code you would expect - and I love the implementation. 

More than half the time is debugging time (so far). I did not use TDD this time, because I had no idea where to start with the tests. 

Good news:
- The implementation is working with FMX ( this was no question, wasn't it ) but also with VCL.
- I have a small team of developers for beta-testing.
- There will be two different versions. Of course as a Plugin to my FDK, but also a stand-alone Version.

The FMX Version is more advanced at this state and the VCL version will see "the light of release" a little bit later. The documentation is not existing at the moment and to show the benefits of the framework I have to do some youtube-videos - this is for sure. But not this year - perhaps you will see "something" at CodeRage 2019. (Nov 11. 2019). But this is not decided today.

To answer the question of the blogpost: 6 Month or 4 to get a beta and perhaps one more month for documentation and another one for videos. I will use the FDK installer, that is capable of doing the user registration, updates, online-store and invoices. (bug tracker is coming) Two month. So overall until everything is out including VCL - The final answer is one year.

I assume, that with the final framework, I will be able to create MVVM based Apps at least in half the time then before, just a little bit more than doing good old RAD-stuff, but everything testable. By combining this framework with my FDK you can build a multi-platform-app in weeks instead of month. 

The future of App-development will be great.

PS.: The new Version of the installer is using gnostice document studio for FMX. At forentage I told everybody that I not using this component by myself - this has changed. Thanx to my friend Girish Patil for the support.