LIVE! 13-Feb-2018 Delphi Web Frameworks

Join Craig, David, and Jim as they discuss Delphi Web Frameworks LIVE! 13-Feb-2018 at 12 AM CST [other timezones] Planning to discuss some of the following . . . Ext JS by Sencha UniGUI by FMSoft (uses Ext JS) Kitto (uses Ext JS) MARS-Curiosity by Andrea Magni Smart Mobile Studio by Optimale Systemer AS WebHub by Href Tools Corp Elevate Web Builder by Elevate Software RAD Server by Embarcadero – Single Site license included with Enterprise edition Web Broker by Embarcadero DataSnap by Embarcadero IntraWeb & IntraWeb Bootstrap by AtoZed Software and ships with Delphi / C++Builder Delphi MVC Framework by Daniele Teti mORMot Framework by Synopse More . . .  
Read More

Modernize Your Apps

Modernization continues to be one of the most important topics for many of our customers. Delphi has been around for some time and there are plenty of great “legacy” apps going back all the way to Delphi 7. While it is a testament to the quality of our development frameworks, at some points ten-year-old apps are, well simply too old… Our community of developers are moving to the latest versions so that they can deliver modern, compelling products to their customers. Internally, we have been taking this same journey with the RAD Studio product itself, and while it is not always easy, it is worth the effort. I think that we are finally making a lot of progress, which emboldens me to share some lessons learned that may help you plan your own journey.   Update the UI I think that the most difficult part of any Modernization project is the compelling argument for a UI update. There is one school of thought that says that if it works, who cares that an icon looks old. It is also difficult for developers to be very passionate about it, as they also frequently do not care about look and feel. Yet, an updated look and feel is HUGE. We have made many gradual updates to RAD Studio over the last two years and have a few more in store. When we do surveys, rarely does the look and feel get prioritized. Enterprise software customers rarely admit to buying a software solution because “it looks pretty”.  But once UI improvements are made, the impact tends to be surprisingly high. Especially for Delphi apps that come with an inherent  “legacy” bias. It is a fight worth fighting and fortunately some of the updated VCL and FMX tooling make implementations easier. Take your time and do it right. It is totally worth getting professional designer help (again something that many developers do not do). Be sure not to overlook the impact of nice high quality icons. Here are some examples of the icons that we used for 10.2.2. There are so many choices out there that are very inexpensive. I love www.icons8.com for example.     Do Mobile One of the great advantages of Delphi today is FMX. As smartphone adoption increases (~70% by 2018), FMX will grow in relevance.  If you know VCL, development with FMX is relatively natural. There are of course some styling and behavior specificities, and frankly we need to improve the RAD Studio workflow more, but the productivity is amazing. Most other approaches require a separate team and investment. Historically Mobile Apps were Outsourced as a package, but this is changing. FMX allows a Delphi team to build the Mobile App. You do not need to recreate the old app with FMX, but building meaningful mobile extensions is a must. You will gain immense respect and the Delphi tech will be perceived rightfully as Modern. And you get to build your team. There is a lot of training help to get you started. I personally like Delphi Styles that can deliver some very slick custom looks (below are a couple of great FMX style templates from www.delphistyles.com)     Make It “Multi-Tier” Architecture is not simple. Unfortunately, even great developers may not have knowledge in other areas, simply because of the vast range of areas in software development. Sometimes this means making architectural changes such as moving from a desktop app to a multi-tier can be a learning experience for even the most experienced. It's always great to learn, or to get outside support to assist. We aim to make architectural transitions easy, such as how RAD Server comes with excellent Multi-Tier architecture support features. It is not a daunting task to rethink an old app into a Multi-Tier one, although there are no guarantees (depends how it was built). I have spoken with many developers that at first were very scared, but once they got deeper, found that the effort is far less than expected. For sure, it is hugely less expensive than re-platforming with a completing different language such as Java. Again, one simple approach is to start small and modularize as much as possible. Also, do not rush to lose the VCL client. The speed it can deliver, especially in sensitive environments where seconds matter, cannot be replicated. I am aware of at least several multi-million dollar Java rebuild efforts that aimed to replace a VCL app and users simply did not adopt it… incredible waste.   “Webify” Not a word, but you get the meaning. There are many approaches to do this with Delphi today. Ideally, you can create a tiered app and build an independent Web Client. Of course, we recommend Ext JS, since it is part of the family now, but there are plenty other good client Web technologies. Another approach that may be faster is to use a tool like UniGui, which takes a VCL-like approach and leverages Ext JS to build a Web Client. That does not work for everything but is very fast and productive. You certainly can create a module of your app quickly and demonstrate that Delphi works well and fast with Web. Today many Web interfaces to Delphi apps are built with .NET because of the inherit Windows connection. That of course works, but based on our latest experience and the new JS technologies, the speed and flexibility you can get with JS are great.   Integrate RAD Studio has some of the best Integration frameworks and components. One of the most challenging aspects of other technologies is typically integration, and we do it super well and fast. Our recent Product survey indicates that a huge percentage of our customers have adopted FireDAC, which is fantastic. Figure out new ways for your modern app to be more integrated. How about displaying inventory from an ERP or feeding into it? Our Enterprise Connectors are based on the FireDAC framework and work really well. We even use them internally to create an ExtJS portal to our SFDC instance (illustration below). It is a “wow!” development experience.     Innovate Delphi, through RAD Studio, supports many new capabilities including Push Notifications, Beacons, and the Woll 2 Woll mobile editor (www.woll2woll.com/beam). It is surprising to me how little customers use new Windows 10 features, One of my favorite underutilized technology is Beacons. These are now included for FREE in RAD Studio Enterprise edition. The mobile editor can accelerate the mobile apps developed with this tech dramatically. Given how many internal Delphi apps deal with location data capture, this should be such an easy and nice feature to include. And the best thing about Delphi is that innovating does not need to cost hundreds of thousands of dollars…     Overcome the Legacy Argument This one is not as relevant for our efforts with RAD Studio, but it is a hurdle that each client has to overcome. The perception that Delphi is legacy is still there, despite recent strides to overcome it. Lately, I’ve taken a slightly different approach, which I’ve found very successful. Instead of diving deep into defending Delphi’s many merits, I just state a few facts and brush it aside. It works! Delphi today is one of the larger commercial ecosystems - plenty of open source ones have lost momentum as economics have deteriorated and support dwindled. Not to mention the fact that Delphi is the fastest, easiest to use and most functional development tool (a little subjective, but true).  Our VCL framework for Windows development continues to provide the most native support for MS Windows, and nothing beats it. FMX provides better native cross-platform support than Xamarin and its popularity, especially for Android development is growing rapidly. I think that for any company that wants to manage technology risk, Delphi and VCL are far safer choices than even the trendiest of technologies and frameworks out there. Just ask someone who has gone through the several iterations of Angular or spent a boat-load on a Java migration. The combination of a highly productive language that is reusable and can work with flexible front and back-ends make Delphi a strong technology contender. Well, this got a bit longer than intended, but there is one point about Modernization that is perhaps the most difficult to overcome. It again has to do with perception rather than the technology.  Customers continue to make the argument about the lack of availability of trained Delphi resources. Unfortunately, it is still true that there are fewer skilled Delphi developers compared to other popular technologies. Outsourcers are especially negative to these tools, as the productivity tends to go directly against their business model. Why sell you 5 Delphi developers when I can sell you 50 Java ones. But that is also the winning argument, you do not need that many Delphi developers – it is THAT good. And if you need to brush up on your skills or train a new team, we continue to develop Embarcadero Academy with more content and course options. In our experience a senior developer can pick-up Delphi super fast. Lets blow away technology sceptics with amazingly modern-looking apps!
Read More

Extended = Double in Lazarus Win64

Note to self: In Lazarus Win64 there is no floating point type Extended, it’s mapped to Double. So, overloading something like: function TryStr2Float(const _s: string; out _flt: Extended; _DecSeparator: Char = '.'): Boolean; overload; function TryStr2Float(const _s: string; out _flt: Double; _DecSeparator: Char = '.'): Boolean; overload; function TryStr2Float(const _s: string; out _flt: Single; _DecSeparator: Char = '.'): Boolean; overload; will not compile. Workaround: Add an {$IFNDEF Win64} around it: {$IFNDEF Win64} function TryStr2Float(const _s: string; out _flt: Extended; _DecSeparator: Char = '.'): Boolean; overload; {$ENDIF} function TryStr2Float(const _s: string; out _flt: Double; _DecSeparator: Char = '.'): Boolean; overload; function TryStr2Float(const _s: string; out _flt: Single; _DecSeparator: Char = '.'): Boolean; overload; This probably also applies to Delphi when compiling for others than the Win32 target, e.g. Win64, Android, IOS etc.
Read More

Petra Wins Embarcadero Cool App for December

Any developer knows how time consuming it can be to come up with good graphics for multi-platform development. There are so many different device pixel densities that require different images. That’s why I’m excited to announce Embarcadero’s December Cool App winner, Petra, which makes it easy to take quality vector graphics from Sketch and turn them into natively drawn user interface elements for cross platform Delphi apps.

Petra’s support for FireMonkey, Android and iOS drawing APIs provides maximum flexibility in targeting different platforms. It’s one of those tools where using it once inspires you to want to use it more and more, and I have to admit, I’m addicted.

Petra easily moves between design and coding without ever needing to deploy 1x, 2x or 3x images in the final app. The tool also allows developers to create resolution-independent and scalable drawings with dynamic behavior, without the need for static rapid prototyping of UI Components.

 

When asked about his choice of languages, Petra developer Nader described Delphi as a “recipe of a great programming language plus RAD IDE plus ecosystem of third party frameworks and components plus passionate community of supportive developers. All combined to enable developers to target multiple platforms from one code base, natively and beautifully.”

 

This video shows Petra in action:

[YoutubeButton url=’https://www.youtube.com/watch?v=TdJWjhQmdEY&list=UUtiYv9BkrZ7dl7ZYguLB-5g’]

 

Interested in submitting for the Embarcadero’s Cool App contest? It’s open to any business or consumer application built with RAD Studio, Delphi or C++Builder. Embarcadero awards Cool App contest winners a $500 Amazon gift card and winning submissions are also highlighted on the company’s YouTube channel. For more information on the contest and a link to the submission form, click here.

Read More

Read More

Switching a XenServer VM from PVM back to HVM

(Disclaimer: I am by no means an expert with XenServer. So please don’t take anything you read here for granted. It’s my own experience and what I found in documentation and online.) If switching a XenServer Linux VM to paravirtualization fails, you usually end up with a non booting VM which is quite annoying. Switching it back to hardware assisted virtualization isn’t difficult, if you know what to do: Open a console on the XenServer host (local or via ssh) Get the UUID of the VM you want to change: xe vm-list name-label="NameOfTheVM" change two parameters of the VM Set HVM-boot-policy to “BIOS order” xe vm-param-set uuid=UuidOfTheVM HVM-boot-policy="BIOS order" Set PV-bootloader to “” xe vm-param-set uuid=UuidOfTheVM PV-bootloader="" If everything works, the virtualization mode of the VM in XenCenter should be switched back to “Hardware-assisted Virtualization (HVM)” and the VM will boot again. Source: This Citrix Forum post Another article about this
Read More

MockJSONAPI Server

Let’s say that you need to develop a REST client (e.g. mobile app, web client, web SPA or a desktop thin client) and you need some endpoints to use. The usual problem in this case is that you need to start to develop the server before you can show something to the end user. MockJSONAPI server solves this problem giving to the developer a bare-bone REST server with the standard CRUD interface. The data are stored into a single JSON file. MockJSONAPI is a mock server for a generic JSON API. It is built with Delphi and delphimvcframework. Can be used with any client technology and language (e.g. the server unit tests are in Python). When mockjsonapi server receives a requests it matches the request against the data.json that have been configured. More Info MockJSONAPI Server is a quite simple project but is really useful for all the developers that have to work with RESTful APIs. More details and info at the project page.
Read More

Delphi: playing Chimes.wav as an external file or embedded WAVE resource in Delphi XE5.

Recently I had to play some notification sounds in a Windows Delphi application where the application deployment should be as easy as possible: preferable copying the EXE around. Playing a sound file seems easy, especially if it is a WAV file: just use the PlaySound or the (older) sndPlaySound API functions. But if you start searching […] … Read More

Read More

Damned ! var Comp : function(const s1, s2: string): Boolean; begin if CheckB…

One of my main gripes about lots of RTL/VCL/FMX code: conventions are often lacking. Which means one of the below functions starts with Ansi (but does a Unicode operation) and the other has the parameters in reverse. var Comp: function(const s1, s2: string): Boolean; begin if CheckBox1.Checked then Comp := ContainsText else Comp := AnsiStartsText; […] … Read More

Read More

Some FastMM scenarios require NeverUninstall because the System unit finalizes things innitialised in other units

You always have to be careful  with Delphi finalization sections cleaning up things that might have not created inside the corresponding initialization section. This is especially true for the System unit. That one actually contains this little piece of code that is being called after FinalizeUnits is called which also fianalises external memory managers like FastMM: finalization {$IFDEF […] … Read More

Read More

Animation problems in Delphi Tokyo 10.2 update 2? Check bug RSP-19525

If you run into animation problems in Delphi Tokyo 10.2 update 2, then read [WayBack] … In particular I cannot use the use the animation to change the tab in a TabControl… – Raffaele Miola – Google+. It is likely that  RSP-19525 (10.2 Tokyo Release 2 breaks Animation under Android – App hangs). Some temporary fixes […] … Read More

Read More