Delphi Cookbook 3ed is out!

Here’s the 3rd edition of the Delphi Cookook! Delphi Cookbook is a best sellers for PacktPub in its category since the 1st edition back in the 2014.

Delphi Cookbook 3rd Edition
Delphi Cookbook 3rd Edition

This edition is the first in co-authoring with Daniele Spinetti. Daniele Spinetti is an Embarcadero MVP wich works with me in bit Time Professionals (site in english here). We works together every days, so has been a pleasure to share this experience too.

What’s new in 3rd edition

In this third edition we wanted to add content to keep the book updated with emerging technologies and new features made available by Delphi. Like the 2nd edition, some chapters are completely new while all the others has been updated, evolved and integrated with new contents. The new chapters are devoted to Linux Development and IoT. Moreover there are many new contents about FireDAC and RTTI attributes.
This edition contains all the recipes from the previous version updated to Delphi 10.2 Tokyo. We reached now 780 pages and 78 recipes!

Delphi Cookbook 3rd edition lets you learn all the development possibilities provided by Delphi

  • Cross-platform
  • Mobile with FireMokey (Android and iOS)
  • Server-side programs (Linux and Windows)
  • Integration with IoT
  • Working with data (FireDAC, JSON, XML)
  • a lot more…

Topics of the book

  • Develop visually stunning applications using FireMonkey
  • Deploy LiveBinding effectively with the right OOP approach
  • Working with data (JSON, XML)
  • Design, develop and deploy server-side programs to serve RESTful web services (Linux and Windows) and provide data to your mobile and web apps
  • Use well-defined GUI design patterns to build mobile applications that provide a great user experience
  • Extremely useful recipes on FireDAC database access framework
  • Build mobile apps that read data from a remote server efficiently
  • Call the platform native API on Android and iOS even for an unpublished API
  • Manage software customization for your customer by making better use of an extended        RTTI
  • Implement the most popular design pattern without wasting too much time on debugging and bug fixing
  • Enrich your knowledge of Delphi deepening the libraries made available
  • Integrate your applications with Internet of Things

As I told also at the time of 1st and 2nd edition, Delphi Cookbook is not an introductory book, you will not find any “Introduction to the Object Pascal language”, however the majority of the chapters are not too complex and can be grasped also by the new Delphi programmers.

Where to buy

The book is available for sale on the editor website and on Amazon.

PacktPub (Official book page)

Amazon

Source code is on github

Table of contents

Chapter 1: Delphi Basics

  • Changing your application’s look and feel with VCL styles
  • Changing the style of your VCL application at runtime
  • Customizing TDBGrid
  • Using owner-draw combos and listboxes
  • Making an owner-draw control aware of the VCL styles
  • Creating a stack of embedded forms
  • Manipulating JSON
  • Manipulating and transforming XML documents
  • I/O in the 21st century – knowing the streams
  • Creating a Windows Service
  • Using the TService.LogMessage method
  • Be coherent with the Windows look and feel using TTaskDialog
  • The amazing TFDTable – indices, aggregations, views, and SQL
  • ETL made easy – TFDBatchMode
  • Data integration made easy – TFDLocalSQL

Chapter 2: Becoming a Delphi Language Ninja

  • Fun with anonymous methods – using higher-order functions
  • Writing enumerable types
  • Using enumerable types to create new language features
  • RTTI to the rescue – configuring your class at runtime
  • Duck typing using RTTI
  • BOs validation using RTTI attributes
  • Creating helpers for your classes

Chapter 3: Knowing Your Friends – The Delphi RTL

  • Checking strings with regular expressions
  • Consuming RESTful services using native HTTP(S) client libraries
  • Coping with the encoded internet world using System.NetEncodings
  • Saving space using System.Zip
  • Decoupling your code using a cross-platform publish/subscribe mechanism

Chapter 4: Going Cross-Platform with FireMonkey

  • Giving a new appearance to the standard FireMonkey controls using styles
  • Creating a styled TListBox
  • Impressing your clients with animations
  • Using master/details with LiveBindings
  • Showing complex vector shapes using paths
  • Using FireMonkey in a VCL application
  • Reinventing your GUI, also known as mastering Firemonkey controls, shapes, and effects

Chapter 5: The Thousand Faces of Multithreading

  • Synchronizing shared resources with TMonitor
  • Talking with the main thread using a thread-safe queue
  • Synchronizing multiple threads using TEvent
  • Communication made easy with Delphi Event Bus
  • Displaying a measure on a 2D graph like an oscilloscope
  • Using the Parallel Programming Library in the real world: Tasks
  • Using the Parallel Programming Library in the real world: Futures
  • Using the Parallel Programming Library in the real world: Parallel For/Join

Chapter 6: Putting Delphi on the Server

  • Developing web client JavaScript applications with WebBroker on the server
  • Converting a console application into a Windows service
  • Serializing a dataset to JSON and back
  • Serializing objects to JSON and back using RTTI
  • Sending a POST HTTP request for encoding parameters
  • Implementing a RESTful interface using WebBroker
  • Controlling remote application using UDP
  • Using app tethering to create a companion app
  • Creating DataSnap Apache modules
  • Creating WebBroker Apache modules
  • Using native HTTP(S) client libraries
  • Logging like a pro using LoggerPro

Chapter 7: Linux Development

  • Creating Linux TCP/IP servers
  • How to correctly handle Linux signals
  • How to build a modern Linux daemon
  • Building a TCP/IP Linux server and daemonizing it
  • Building a RESTFul server for Linux
  • Building a complete RESTful server with database access and web client interface
  • Creating WebBroker Apache modules for Linux

Chapter 8: Riding the Mobile Revolution with FireMonkey

  • Taking a photo, applying effects, and sharing it
  • Using TListView to show and search local data
  • Using SQLite databases to handle a to-do list
  • Do not block the main thread!
  • Using a styled TListView to handle a long list of data
  • Customizing the TListView
  • Taking a photo and location and sending it to a server continuously
  • Talking with the backend
  • Making a phone call from your app
  • Tracking the application’s life cycle
  • Building your own SMS sending service with the REST API

Chapter 9: Using specific platform features

  • Using Android SDK Java classes
  • Using iOS Objective-C SDK classes
  • Displaying PDF files in your app
  • Sending Android Intents 554
  • Letting your phone talk – using the Android TextToSpeech engine
  • Using Java classes in Android apps with Java2OP
  • Doing it in the background, the right way – Android services

Chapter 10: Delphi and IoT

  • How to blink an LED using Arduino
  • How to drive multiple relays with Arduino and Delphi
  • Reading data from Arduino
  • How to blink an LED using Raspberry Pi
  • How to drive multiple relays with Raspberry Pi and Delphi
  • Reading data from Raspberry PI

 

ITDevCon 9 is coming!

ITDevCon2016 logo

ITDevCon 9 is coming!

Yes, this year we started to name ITDevCon, the usual event for all the best Delphi “heads” (at least in this side of the world) with a version name. So, ladies and gentleman, this will be ITDevCon 9. As usual me and my team are in charge to choose the topics and build the agenda. ITDevCon 9 will be held next October 18th, 19th in Rome (Italy), in the same location of the last year: the bit Time group headquarter in Rome!

ITDevCon 9 will be organized, as usual, by bit Time Professionals, part of the bit Time Group.

CALL4PAPERS

The call for papers are officially open right now, so if you want to propose some speeches, I’ll be glad to see them.

Send your Call4Paper to d.teti@bittime.it.

I already received some C4P, I’ll reply as soon as all the tech comitee members will accept (or reject) the proposals.

As usual, for the Call4Paper I need:

  • Title (for every talk)
  • Abstract (for every talk)
  • Difficulty level (for every talk)
    • Difficulty level is a scale from 1 to 3 with the following mean: introduction, intermediate, advanced
  • Speaker’s photo (at least 500x500px)
  • Speaker’s profile

I’m looking forward to your proposal. The call4papers ends at Sep 16th, 2018 but if you have *VERY* interesting topic to propose, propose it… I’ll try to arrange the schedule and fit it in the agenda.

Proposals will be evaluated and the speakers will be contacted ASAP.

TOPICS

This year topics will be the following:

  • What’s new in the latest Delphi versions
  • Development best practices
  • Cool (dev) things that you are doing or that you did in the recent past
  • Linux development
  • IoT (Internet of Things) solutions
  • FireMonkey platform
  • MacOS development
  • Windows development
  • Mobile development (Android and/or iOS)
  • Develop UIs for different devices (smartphones, tablets, TV, watch etc)
  • Design Patterns
  • OOP best practices
  • Valuable Open Source Delphi Frameworks
  • Delphi success cases
  • Arduino, Raspberry Pi or others similar system
  • Web Application with Delphi
  • Optimization
  • Integration with external systems
  • TDD and Unit Tests
  • Agile methodologies
  • Advanced techniques to access your data
  • UI, UX, optimization for mobile and desktop
  • RESTful interfaces design and development
  • JSON-RPC
  • Architectures

TARGET AUDIENCE

  • Software architects
  • Software developers
  • Project managers
  • IT managers
  • Trainers

The conference web site is http://www.itdevcon.it

Up to Aug 10th you can get the ticket at the discounted early bird of 299.00 Euro. After that day the normal ticket price will be 359.00 Euro. Get it!

The full ticket includes:

  • 2 conference days
  • Lunches (with very good italian food 😉 )
  • Coffee Breaks
  • Gadgets
  • Prize Draw

DISCOUNTS

For this edition we at bit Time Professionals want to give some heavy discounts to some particular situations and people.

More information about discounts at the web site.

TWITTER CONTEST

Starting from Sep 1st you can start to tweet using the hastag #itdevcon. Using a “very” complex formula (number_of_followers * number_of_tweets), the most active/influencer conference partecipant will win a special “Twitter Contest Prize” at the end of the conference. The score will be calculated at the closing keynote, so you cannot get the prize if you don’t attend the conference.

PHOTO CONTEST

All the ITDevCon attendant can partecipate to the Photo Contest. From all the photos twitted with the @itdevcon hastag will be extracted the best one (the judge is our official photographer Valentina).  The winner will get a special prize at the end of the conference. The photo will be selected just before the closing keynote, so you cannot get the prize if you don’t attend the conference.

 CONCLUSIONS

Do you want to see a particular topic or have a suggestion for ITDevCon 9? Let me know

As usual one of the most important part of ITDevCon will be the networking between attendees. I know about great collaboration born during ITDevCon. Be there and don’t miss this social opportunity!

Thank you and…  see you at ITDevCon 9.

DelphiMVCFramework 3.0.0-hydrogen is out!

 

Yes! After 18 months of development, more than 10 contributors (with a special thanks to Ezequiel Juliano Müller) and more than 500 commits, DelphiMVCFramework 3.0.0-hydrogen is finally out! It is a big releases with a lot of changes, refactorings and new features. All the 2.x users are strongly encouraged to migrate to this version.

The latest version will be always available at this link. Please, check that the suggested installation procedure is different from the 2.x branch. You have just to download the zip from the previous link and put the paths in the Delphi libs path. That’s it! Then, you have Delphi Ent+ you can also install the IDEExpert, however the IDEExpert is not required to use the framework… it is just an helper.

To help the migration from the 2.1.x branch, we wrote the breaking changes list.

DelphiMVCFramework 3.0.0 breaking changes

  • XE6 and previous versions are no more supported.
  • RenderListAsProperty<T> has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
  • RenderJSONArrayAsProperty has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
  • Render has been removed from TMVCController (was deprecated).
  • Render(TJSONValue) has been removed from TMVCController (use Render(TObject)).
  • Trying to deserialize a TJSONNull the target instance will not be freed anymore (consistency with serialize).
  • The default JSON engine, used in the framework, is no more the Delphi built-in but the excellent JSONDataObjects (https://github.com/ahausladen/JsonDataObjects).
  • Context.Request.BodyAsJSONObject dosen’t exist any more.

Use BodyAs<T> or the following pattern to migrate:

JSON := TJSONObject.ParseJSONValue(Context.Request.Body) as TJSONObject;
try
  if not Assigned(JSON) then
    raise EMVCException.Create('Invalid JSON');
  // do something here
finally
  JSON.Free;
end;
  • TMVCConfigKey moved to unit MVCFramework.Commons.
  • TMVCMimeType was renamed to TMVCMediaType.
  • TMVCController.Render; no parameter method do not exist anymore. If the return is a ResponseStream, use the RenderResponseStream.
  • TMVCController.PushJSONToView; was renamed to PushToView and has been removed the SystemJSON dependency, use the ToJSON method if necessary.
  • There is no more a default view engine for Server Side Views (before 3.0 there was mustache).
  • Mustache engine is no more the only view engine available. Now you can implement all the view engines you need (check the serversideviewsprimer).
  • On Linux there is no built-in available view engine available. In other words, using only the built-in classes, you cannot use server side views on linux (dmustache is not compatible on linux).
  • HTTP File Upload doesn’t work on Linux because of a bug in Delphi 10.2.0 (https://quality.embarcadero.com/browse/RSP-17216).
  • [MapperJSONNaming(TJSONNameCase.JSONNameLowerCase)] now must be changed in [MVCNameCase(ncLowerCase)]
  • [MapperJSONNaming(TJSONNameCase.JSONNameUpperCase)] now must be changed in [MVCNameCase(ncUpperCase)]
  • Removed LogEx and LogException. Use Log.ErrorFmt instead.
  • PushObjectToView has been deprecated. Use ViewData property;
  • PushDataSetToView has been deprecated. Use ViewDataSet property;
  • ViewModels has been renamed in ViewData[];
  • ViewDataSets has been renamed in ViewDataset[];

TRESTClient specific breaking changes

  • Every reference to TJSON* has been removed from the TRESTClient public interface. To port the existing code, you have to include MVCFramework.RESTClient.SystemJSONUtils and change your code as following:

Before
lMyJSONObject := Response.BodyAsJsonObject.Clone as TJSONObject;
After
lMyJSONObject := TSystemJSON.BodyAsJsonObject(Response) as TJSONObject; try //use the object finally lMyJSONObject.Free; end;

  • The memory allocated for the TJSONValue descendant (e.g. TJSONObject, TJSONArray and so on) is no more managed by the TRESTClient itself but must be feed by the calling code.
  • DelphiStompClient has been removed from the core.
  • The following method is no more available in TMVCController.
    function GetNewStompClient(const AClientId: string = ”): IStompClient;
  • TMVCConfigKey.ISAPIPath has been substituted with TMVCConfigKey.PathPrefix and now is applicated to all kind of projects (not only ISAPI);
  • MapperSerializeAsString attribute is now MVCSerializeAsString
  • ContentCharset is no more available (everywhere). You have to properly set ContentType. To do that is available the function CreateContentType.

 

Conclusions

If you are on Delphi XE7+ there are no reason (apart time/money) to mantain a 2.x server. The change is smooth and simple. The DMVCFramework team already did portings for a lot of customers and the porting is a matter of hours, not days nor weeks…. just hours. Many users already did the change.

 

DelphiMVCFramework Book

Considering the high demand, I’m starting to write a DelphiMVCFramework book that will cover from the basic utilization to the advanced scenarios. The book will be available ASAP through the leanpub platform (https://leanpub.com/).

 

Enjoy!

 

DT

 

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. You can start to develop the GUI prototype without worry about the actual backend. When you agree with your customer, then you can start to develop a proper backend.

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.

DAPUG event in Denmark

Today and tomorrow I’ll be the speaker at the DAPUG event in Denmark. The title of the event is “DELPHI IN THE ENTERPRISE”. What is an enterprise application? Obviously there isn’t a measure to know if an application is enterprise or not, but the following needs usually require and enterprise level application.

  • Critical functionality
  • Large quantity of concurrently accessed data
  • Large number of screens
  • Integration with 3rd part systems
  • Conceptual dissonance
  • Complex business rules

In such scenarios we cannot just create a larger “small” application; you have to change your mindset and adopt new tools. The OO principles, design patterns and unit tests are the first step to get success in the enterprise field (and also in all the others smaller field), but what’s next? At the DAPUG event I’ll talk about the tools and the products that can help our Delphi system to be able to play well in the enterprise field.

From this idea, these are the topics covered at the DAPUG event in Denmark:

Tuesday day 1

Real-world Linux Development with Delphi
DMVCFramework 3: RESTful services and much more

Wednesday Day 2

The amazing Redis
Analysis and searches with ElasticSearch
Using ORM in Delphi
Logging done right; How to use and extend LoggerPro

 

I think that the topics are really interesting, we’ll see what will think the DAPUG members after the workshop 🙂

 

Stay tuned

ITDevCon 2017 – The Delphi European Conference

ITDevCon2016 logo

ITDevCon 2017 is coming!

As every year (but 2015), I’m building the agenda for next ITDevCon that will be held next October 11th, 12th in Rome (Italy), in the same location of the ITDevCon 2016 and ITDevCon 2017 spring edition: the bit Time group headquarter in Rome!

This will be the 8th conference edition and will be organized, as usual, by bit Time Professionals, part of the bit Time Group.

CALL4PAPERS

The call for papers are officially open right now, so if you want to propose some speeches, I’ll be glad to see them.

Send your Call4Paper to d.teti@bittime.it.

I already received some C4P, I’ll reply as soon as all the tech comitee members will accept (or reject) the proposals.

As usual, for the Call4Paper I need:

  • Title (for every talk)
  • Abstract (for every talk)
  • Difficulty level (for every talk)
    • Difficulty level is a scale from 1 to 3 with the following mean: introduction, intermediate, advanced
  • Speaker’s photo (at least 500x500px)
  • Speaker’s profile

I’m looking forward to your proposal. The call4papers ends at Sep 24th, 2017 but if you have *VERY* interesting topic to propose, propose it… I’ll try to arrange the schedule and fit it in the agenda.

Proposals will be evaluated and the speakers will be contacted ASAP.

TOPICS

This year topics will be the following:

  • What’s new in the latest Delphi versions
  • Linux development
  • IoT (Internet of Things) solutions
  • FireMonkey platform
  • MacOSX development
  • Windows development
  • Mobile development (Android and/or iOS)
  • Develop UIs for different devices (smartphones, tablets, TV, watch etc)
  • Delphi best practices
  • Design Patterns
  • OOP best practices
  • Open Source Delphi Frameworks (Spring4d, DelphiMVCFramework etc)
  • Arduino, Raspberry Pi or others similar system
  • Web Application with Delphi
  • Integration with external systems
  • TDD and Unit Tests
  • Agile methodologies
  • ORM and other data access patterns
  • Using NoSQL databases (even to speed up your VCL software)
  • FireDAC advanced techniques
  • UI, UX, optimization for mobile and desktop
  • OOD/OOP
  • Real use cases for extended RTTI, Generics and Anonymous Methods
  • RESTful interfaces design and development
  • Architectures
  • Cool (dev) things that you are doing or that you did in the recent past

TARGET AUDIENCE

  • Software architects
  • Software developers
  • Project managers
  • IT managers
  • Trainers

The conference web site is http://www.itdevcon.it

Up to Sep 17th you can get the ticket at the discounted early bird of 299.00 Euro. After that day the normal ticket price will be 359.00 Euro. Get it!

The ticket includes:

  • 2 conference days
  • Lunches (with very good italian food 😉 )
  • Coffee Breaks
  • Gadgets
  • Prize Draw

DISCOUNTS

For this edition we at bit Time Professionals want to give some heavy discounts to some particular situations and people.

  • If you come to ITDevCon 2017 with others colleague from the same company (2 or more tickets bought by with the same invoice), you have 20% discount;
  • If you are less than 30 years old (up to 29 years old) you have 30% discount;
  • If you are less than 22 years old (up to 21 years old) you have you ticket for only 100€;

More information about discounts at the web site.

CONCLUSIONS

Do you want to see a particular topic or have a suggestion for ITDevCon2017? Let me know

As usual one of the most important part of ITDevCon will be the networking between attendees. I know about great collaboration born during ITDevCon. Be there and don’t miss this social opportunity!

Thank you and…  see you at ITDevCon 2017.

ITDevCon 2017 Spring Edition has been a success!

ITDevCon 2017 Spring Edition has been a success! Beyond the good crowd of loyal Delphi italian programmers that usually comes to ITDevCon, also a good number of new guys were coming to the “Spring Edition”. Maybe because the SE is shorter, maybe because all the speeches were in italian, maybe because the Linux support attracted new people… maybe for all these things (we are still giving a full meaning to the surveis took during the conference).

The “community” mood has been always present at ITDevCon, and the SE is not different. Here’s some photos taken by our official photographer Valentina.

All the other photos are available in the ITDevCon 2017 SE album on ITDevCon facebook page.

Thanks to our sponsors, the final raffle gets its usual success!

So a big thank you to:

 

 

Here’s some photos, check the full album ITDevCon 2017 SE album on ITDevCon facebook page.

The class during my speech about hard-core linux development with Delphi
The class during my speech about hard-core linux development with Delphi
Salvatore introducing columbusegg4delphi
Salvatore introducing columbusegg4delphi

Daniele Spinetti (a.k.a. Spinettaro a.k.a. Danielino) talking about RaspberryPI+Delphi controlling hardware.
Daniele Spinetti (a.k.a. Spinettaro a.k.a. Danielino) talking about RaspberryPI+Delphi controlling hardware.

Italian Food!!
Italian Food!!
Italian Food!!
Italian Food!!

 

See you at the next ITDevCon… the standard one!

ITDevCon 2017 Spring Edition

Yes, we did it!

As we anticipated at the last ITDevCon in Rome (oct 2016) in 2017 we organized another appointment with ITDevCon, called Spring Edition. The Spring Edition is shorter than the classic edition and it is only in italian language, but offers the usual high-level contents that the ITDevCon brand usually does.

Many users recognize ITDevCon as a “different” conference – it is more business oriented, more practical and more authoritative than many other conferences out there. We are glad of these opinions and we’ll do our best to mantain this situation. So, this year we want to test a different format and timing. To keep things simple, we organized the spring edition only in italian language (that’s it, all the speeches are in italian). Don’t be afraid, the standard ITDevCon conference will remain of 2 days in october/november timeframe and with the usual format and languages!

In this spring edition I’ll talk about the following topics (in italian):

 

I miei speech per ITDevCon 2017 Spring Edition

DelphiMVCFramework 3.0: l’evoluzione della specie!
Dopo oltre 7 anni di sviluppo ininterrotto DelphiMVCFramework è arrivato alla versione 3.0 ed è uno dei framework RESTful più popolari del mercato. Oltre ad avere nuove caratteristiche, la versione 3.0 si distingue per una serie di refactoring e componentizzazioni che la rendono più snella, veloce, potente ed estendibile. Inoltre, dmvcframework 3.0 aggiunge il supporto per Linux e per la serializatione automatica personalizzata. Anche solo ricompilando un progetto 2.x avrai un importante miglioramento delle performance. In questo talk vedremo cosa c’è di nuovo nella 3.0, tutti i cambiamenti rispetto alla 2.x e come sviluppare soluzioni dmvcframework per Linux. Se già conosci dmvcframework, o anche se vuoi conoscere uno dei framework RESTful per Delphi più popolari, non puoi perdere questo talk.

Delphi per Linux… ma per davvero! Segnali, servizi e daemon
Scrivere un’applicazione console che esponga un servizio TCP o che esegua altre operazioni in background sembra facile. Scriverla correttamente e secondo le best practices tipiche di Linux potrebbe non esserlo. Per chi viene da Windows la conoscenza di alcuni aspetti tipicamente Linux potrebbero fare la differenza tra un software professionale e uno che “da me funziona”. Ad esempio: come gestire i segnali Unix? Come gestire la concorrenza tra segnali? I miei interrupt software sono rientranti? Come far partire un daemon al boot? come farlo ripartire da command line? Come gestire il cambio della configurazione e il restart? Se il daemon dovesse andare in crash, come posso farlo ripartire in automatico? Come definisco le dipendenze tra daemon? In questo speech molto denso di informazioni daremo risposta a tutte queste domande con esempi su Ubuntu Linux scrivendo servizi per systemd (lo standard de facto per sistemi Linux moderni).

Trasforma un database relazionale in un vero decision support system con Elasticsearch
Quando la struttura dei dati è complessa, non strutturata o i dati da ricercare diventano tanti, il database relazionale non è più lo strumento adatto a gestirli in maniera efficiente. Anche il sistema più semplice genera dati non strutturati come log, testi descrittivi, campi “note” e altro. Ostinarsi ad utilizzare un database relazionale in uno scenario del genere è assolutamente controproducente e può comportare problemi di usabilità e performance per gli utenti finali. Tenere traccia dei dati non strutturati non è sufficiente a dargli un senso e a renderli una buona base per un DSS (decision support system). Ancora una volta, usare un database relazionale è una soluzione miope, antiquata e inefficiente al problema. ElasticSearch permette di dare un senso ai dati non strutturati, e/o non omogenei, in maniera efficace ed efficiente. In questo talk vedremo cosa è ElasticSearch e perché potrebbe aver senso integrarlo nella propria soluzione software. La possibilità di affiancare ElasticSearch ad un sistema esistente senza stravolgerne l’architettura attuale, rende la scelta di ElasticSearch vantaggiosa e indolore.

E’ possibile acquistare i biglietti per la conferenza direttamente dal sito.

Ci vediamo a Roma!

DT

ANN: DelphiMVCFramework 3.0 beta

In the last months some of the great 9 DelphiMVCFramework contributors from all over the world, have worked hard to release the version 3.0. Now it is ready to be tested!

dmvcframework

DelphiMVCFramework is one of the most popular RESTful framework for Delphi, so any change has been accurately considered and also its impact on the current 2.x projects has been take in consideration. There are a lot of new core features that will make even more easy to work on (and with) your beloved RESTful framework. Also, all these changes will make the framework even more flexible regarding the serializators even for custom types (yes, now you can register your custom serializer for your data types). Also, JSON is no more the only “built-in” supported format. Well, now JSON is the only format, but now is really easy to add to the serializers registry a brand new serializer which serialize in XML, YAML, BSON, CSV etc. The serializers are recicled between requests to get the maximum performances.

Considering that some often-used methods have been removed or refactored, we tracked all the breacking changes in a document, so that you can evaluate the impact that the new version may have on your projects.

Here the content of the document as it is today (the latest version is available here).

DelphiMVCFramework 3.0.0 breaking changes

  • RenderListAsProperty has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
  • RenderJSONArrayAsProperty has been removed from TMVCController. You can set such kind of specialized serializations in your custom base controller.
  • Render has been removed from TMVCController (was deprecated).
  • Render(TJSONValue) has been removed from TMVCController (use Render(TObject)).
  • Trying to deserialize a TJSONNull the target instance will not be freed anymore (consistency with serialize).
  • Context.Request.BodyAsJSONObject dosen’t exist any more. Use BodyAs or the following pattern to migrate.
JSON := TJSONObject.ParseJSONValue(Context.Request.Body) as TJSONObject;
try
  if not Assigned(JSON) then
    raise EMVCException.Create('Invalid JSON');
  // do something here
finally
  JSON.Free;
end;
  • TMVCConfigKey moved to unit MVCFramework.Commons.
  • TMVCMimeType was renamed to TMVCMediaType.
  • TMVCController.Render (no parameter method) do not exist anymore. If the return is a ResponseStream, use the RenderResponseStream.
  • TMVCController.PushJSONToView was renamed to PushToView and Removed SystemJSON dependency, use the ToJSON method if necessary.

As you can see, the breaking changes are very few and there are very low probabilities that will require you more than 10 minutes to fix them even in a big DelphiMVCFramework 2.x project. I did it for our biggest projects, and 10 minutes are largely over-estimated.

Beta Tests

For the next weeks/months the 3.0 beta version will be available for testing. If no major bugs will be found, the 3.0 will be merged in the main branch.

To test the 3.0 beta version you have to checkout the “pluggable_mapper” branch (clone the repo if you didn’t already, and then checkout the “pluggable_mapper” branch).

You can go back to the 2.1.6 (carbon) when you finished the test. There is no reason to be afraid about the changes. They are really in the deep layers and should not affect the “normal” services.

Happy testing!

Community

Considering all the help requests coming from the users (and the fact that facebook is not permitted in some companies) we at bit Time Professionals (the company which lead the development of DelphiMVCFramework and other open source Delphi projects) decided to create a specific community and leave the facebook group only for announces and polls.

Some of bit Time Professionals Open Source Projects
Some of bit Time Professionals Open Source Projects

So, if you need help about DelphiMVCFramework, LoggerPro, Delphi Redis Client, columbusegg4delphi, Delphi Event Bus, Delphi STOMP client, you can go to the bit Time Professionals Community and ask there. If you want to support the projects or you need fast responses, you can also subscribe to the “professional support” group (with a very low fee) and your requests will get priority upon the other by our engineers (which likely wrote 80% of the framework code). When possibile, the support team will send you a specific sample written specifically to show you how to solve your problem. The “professional” groups will be available soon. If you are interested about prices or other things related to the professional support, ask to professionals(at)bittime(dot)it.

Currently is just started, go to subscribe now!

 

DT

Delphi 10.2 Tokyo: REDIS Client is ready for Linux (VIDEO)

Now that Delphi can compile for Linux, I’d like to show how to use Delphi REDIS client on Linux.
Redis is a very powerful key-value store server used by the biggest companies in the world. While it is very popular in web applications with thousands of concurrent users, also traditional desktop applications can benefits by REDIS.
If you need to speedup you application or if you want to optimize your data access layer, I suggest you to partecipate to one of our Delphi and REDIS training.
In this video I’ll use a sample project included with the Delphi REDIS client project to show how is possibile to use REDIS to integrate Delphi Windows application and Delphi Linux servers.

The Linux compatible version of Delphi REDIS Client will be available through GetIt ASAP.

Enjoy.

Delphi REDIS Client

https://github.com/danieleteti/delphiredisclient