Subscribe: marcocantu.blog
http://blog.marcocantu.com/blog_rss.xmldata
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
academy  at https  community embarcadero  data  delphi  embarcadero academy  embarcadero  online  rad server  rad studio  rad  tasks 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: marcocantu.blog

marcocantu.blog



Techie Italian Blogging on Delphi and More



Updated: 2017-11-20T16:10:58.132Z

 



New on Embarcadero Academy: CodeRage Replays and my New Course and Bundle

2017-11-20T16:10:58.132Z

Embarcadero Academy is growing with new content. Most notably, all of the CodeRage online conference replays are available on the site. I added a new course on Anonymous Methods and a course bundle on Modern Delphi Language.

Embarcadero Academy is an independent online training site available at https://www.embarcaderoacademy.com/. The site has an overall agreement with Embarcadero as a key destination for online training for the company development tools products.

The academy site co-hosted the CodeRage XII conference the other week and it is not offering the complete set of replays. All you need to do is create an account on the platform and sign up for the free CodeRage course at https://www.embarcaderoacademy.com/p/coderage-xii.

On my part, I added a new course on Anonymous Methods and a course bundle on Modern Delphi Language including the courses on interfaces, generics, and anonymous methods. This bundle includes 6 hours of content. Also, all of the courses have a 20% special CodeRage discount until the end of November.

There are many other great classes on Delphi by Alister and non-Delphi classes as well. It is also now possible to take the Delphi certification exams on the academy site. There are other ideas floating around to improve the academy, like live online classes and subscriptions: more than willing to get your feedback (that I can share with the academy site team) or suggestions to me for other topics to cover in future additional courses.

(image)



Explaining Tasks in Delphi Parallel Library... by Creating too Many Tasks

2017-11-16T17:19:00.724Z

While doing some research for an online class, I came up with a demo that highlights the concept of a task in Delphi PPL (Parallel Programming Library) and how they differ from threads.

Recently, I wrote some new demo for Delphi PPL (Parallel Programming Library), while doing some research for an online class -- which is available since last week on the Embarcadero Academy site ("Anonymous Methods in Delphi"), along with a new overall bundle of my classes ("Master Modern Delphi Language Techniques").

In the past I've used different ways to explain tasks and compare them to threads. Tasks are lightweight and managed more efficiently, than threads. The PPL creates a thread pool and assigns pending tasks (and their code) to a pool of threads that depends on your CPU cores and current workload. But these descriptions might still explain tasks and threads as fairly similar in scope. Now let's look at this source code snippet:

      procedure TForm12.btn100sClick(Sender: TObject);
var
  tasks: array of ITask;
  Value: Integer;
  I: Integer;
begin
  SetLength(tasks, 100000);
  Value := 0;

  for I := Low (tasks) to High (tasks) do
      begin
    tasks[I] := TTask.Create (procedure ()
    begin
      TInterlocked.Increment (Value);
    end);
    tasks[I].Start;
  end;

  TTask.WaitForAll (tasks);
  Memo1.Lines.Add(Value.ToString);
end;

As you can see this event handler creates not hundred, but hundred thousand tasks. Each of them has an extremely simple operation to complete -- fairly nonsensical, I know. But you can create 100,000 tasks and they'll all done done in less than a second, on my computer. Consider creating 100,000 threads! that would create a significant extra overhead. By running this code, the tasks are assigned to a few threads in a pool, as you can see in the debugger:

(image)

Small demo and pretty much useless code, but I think it does a good job in highlighting the lightweight and flexible nature of nature of tasks, when compared to threads.

(image)



CodeRage XII Starts Today (With European Schedule)

2017-11-07T10:34:25.040Z

The online CodeRage conference starts today. Here is a European-centric calendar for those living on our side of the ocean. And some more information...

The online CodeRage conference by Embarcadero starts today: https://community.embarcadero.com/article/16578-coderage. Registration is still oepn at https://register.gotowebinar.com/register/7990350396754529539.

With dozens of session based on central US time zones, it is easy to get confised. So I've amended the official calendar for those based in Europe (warning, in case of last minute schedule changes, I won't probably be able to udpate it). Here are thre three PDFs for the 3 days with UTC+1 or Central Europe Time zone times:

Tuesday Nov 7thhttp://blog.marcocantu.com/images/forblog/CodeRageXIIScheduleEuropeTueNov7.pdf

Wednesday Nov 8thhttp://blog.marcocantu.com/images/forblog/CodeRageXIIScheduleEuropeWedNov8.pdf

Thursday Nov. 9thhttp://blog.marcocantu.com/images/forblog/CodeRageXIIScheduleEuropeThuNov9.pdf

Remember you can sign-up and follow the event also on the Embarcadero Academy site at https://www.embarcaderoacademy.com/

I'll be "live tweeting" any even vaguely Delphi-related CodeRage information https://twitter.com/delphitweetday. Follow the account if you don't do already!

(image)



CodeRage XII is Next Week

2017-11-03T10:05:33.774Z

Next week will see the 12th edition of Embarcadero's yearly online conference. Three days full of sessions covering Delphi, C++Builder, InterBase, and all of the company products (including also Sencha's ExtJS), but also general software development topics and third party tools. I'll be giving a couple of sessions. Don't miss it!

(image)

Next week, from Tuesday November 7th to Thursday November 9th will see the 12th edition of Embarcadero's yearly online conference, called "CodeRage" since the CodeGear days. This event goes beyond all other webinars and sessions, in scope, breadth and focus, and is really an online multi-day event. While most sessions will be available afterwards, I really recommend you to plan attending live and get involved into the Q&A and discussion and social media conversations around the conference. Reserve your time and don't be shy asking your boss some free time to attend the conference -- it will be so much cheaper than going to a real one!

You can see the temporary program at:  https://community.embarcadero.com/blogs/entry/coderage-xii-sessions-and-schedule

I won't comment on all of the sessions, but I'm going to mention a few highlight and list mine:

  • Two guess industry luminaries will be giving sessions, Robert Martin (aka Uncle Bob) is speaking on "The Clean Coder - An Introduction to Software Professionalism" and Steven McConnell (of "Code Complete" fame) is speaking on "Managing Technical Debt".
  • RAD Studio product address by the PM team (Sarina, David, and myself) in which we will provide hints (and screenshots) of new features to come in RAD Studio 10.2.2 -- Tuesday 9AM Central US Time or 4PM in Central Europe.
  • Many sessions by well-known Delphi gurus including Ray Konopka (he'll also provide some interesting previews), Cary Jensen, Brian Long, Bob Swart, Danny Wind, Olaf Monien.... and many many others
  • Sessions by most Embarcadero SC at all latitudes, covering many ways to use RAD Studio
  • Detailed covered of many third party tools (including FMX Linux, Arduino integration, reporting, DB tools, UI controls and libraries, code migration, and much much more)
  • Technical sessions by the PM team (David, Sarina, myself, and Sandeep for Sencha). Specifically, I'm giving a session titled "Introduction to Ext JS for Delphi Developers" in which I'll provide some initial information on Ext JS and the use of the Sencha Architect IDE for building the front end of a RAD Server web service -- Tuesday 11AM Central US Time or 6PM in Central Europe.

Finally notice that this year the online conference will be hosted both on GoToWebinar and on Embarcadero Academy at https://www.embarcaderoacademy.com/p/coderage-xii, where you can already sign up and see the detailed schedule.

(image)



Delphi Blogs of the Month #56

2017-10-27T15:59:01.139Z

It has been way more of a month after I blogged my last collection of links, news, and more. Here is a rather long list of blog posts you might have missed. While clearly difficult to have a weekly summary, Iv'e fully retitled this installment, although the URL stays as part of the original weekly sequence. Let's get started. Embarcadero News A Busy Summer at https://community.embarcadero.com/article/16572-a-busy-summer Embarcadero Academy Debuts with Online Courses for Developers of All Levels press release at http://www.businesswire.com/news/home/20170918005798/en/Embarcadero-Academy-Debuts-Online-Courses-Developers-Levels New in 10.2.1: Debug visualisers for Delphi generics at https://community.embarcadero.com/blogs/entry/new-in-10-2-1-debug-visualisers-for-delphi-generics Build iOS 11 ready apps with RAD Studio 10.2.1 at https://community.embarcadero.com/blogs/entry/build-ios-11-ready-apps-with-rad-studio-10-2-1 Updating IDE Subversion DLLs to address security issues at https://community.embarcadero.com/blogs/entry/updating-ide-subversion-dlls-to-address-security-issues Blog Posts Working with big data databases in Delphi - Cassandra, Couchbase and MongoDB (Part 3 of 3) at https://blog.grijjy.com/2017/09/21/working-with-big-data-databases-in-delphi-cassandra-couchbase-and-mongodb-part-3-of-3/ Debugging RTL/VCL Code with CodeSite at http://www.davidghoyle.co.uk/WordPress/?p=1754 and the follow up ,Notify Me of Everything - Part 2, at http://www.davidghoyle.co.uk/WordPress/?p=1761 5 Minute Snack: Reading floats with StrToFloat and TFormatSettings independent of system region settings at https://flixengineering.com/archives/612 Easily Make Asynchronous REST Calls In Delphi 10.2.1 Tokyo On Android, iOS, macOS, and Windows 10 at https://community.embarcadero.com/blogs/entry/easily-make-asynchronous-rest-calls-in-delphi-10-2-1-tokyo-on-android-ios-macos-and-windows-10 Face Detection on Android and iOS at https://blog.grijjy.com/2017/09/11/face-detection-on-android-and-ios/ Experimenting with Neural Networks - Part 1 (and following in subsequent posts) - http://chapmanworld.com/2017/09/20/experimenting-with-neural-networks-part-1/ Adding a Custom Icon to a FireMonkey Button at https://community.embarcadero.com/blogs/entry/adding-a-custom-icon-to-a-firemonkey-button RAD Studio 10.2: Windows 10 VCL UWP/WinRT Support at https://community.embarcadero.com/blogs/entry/rad-studio-10-2-windows-10-vcl-uwp-winrt-support Amazon DynamoDB with Delphi (video) at https://community.embarcadero.com/blogs/entry/amazon-dynamodb-with-delphi 5 Minute Snack: Is a package installed? The Package Manager icons tell you! https://flixengineering.com/archives/618 Third Party Libraries TLanguage localization tool: https://delphitipsandtrick.blogspot.it/2017/10/delphi-tlanguage-localizaton-tool.html Not new but fairly interesting.... Python for Delphi at https://github.com/pyscripter/python4delphi and you can read about it at http://www.atug.com/andypatterns/pythonDelphiTalk.htm Delphi RNL ("Realtime Network Library") at https://github.com/BeRo1985/rnl Use this RFID library in Delphi at https://github.com/islog/liblogicalaccess/wiki/Use-this-RFID-library-in-Delphi Built with Delphi Roselt Color Picker in Windows Store: https://www.microsoft.com/en-za/store/p/roselt-color-picker/9nq8c70flp0r?rtc=1 Smart IDE for OpenSCAD at https://github.com/senCille/senCilleSCAD/wiki   That's all for this month. [...]



Implementing AJAX and JSONP Support in RAD Server for ExtJS

2017-10-19T14:36:24.822Z

Last week at ITDevCon in Rome I’ve given a session about using Sencha ExtJS with RAD Server as backend. For that session I used AJAX calls, but now I’ve also implemented the JSONP support, which provides an alternative in terms of cross-domains calls in browsers. Idera recently acquired Sencha (https://www.sencha.com/) and has added the company products to the Embarcadero business unit, which produced RAD Studio and also the RAD Server web service technology. A natural question arises on how to use the two products together. While there are several options, in this blog post I want to highlight the simple and direct integration of RAD Server and FireDAC with an ExtJS client based on Sencha’s data model architecture. Most of the considerations in this blog post would equally apply to using WebBroker or DataSnap to build the web service.. A Simple Test As first step, I’ve created a simple blank RAD Server application. What this does is to expose standard REST endpoints like “version”. In an ExtJS client build with the Architect IDE, I’ve added a button, picked the Tap event, and written code like the following: onButtonTap: function(button, e, eOpts) { Ext.Ajax.request({ url: 'http://192.168.1.102::8080/version', cors: true, success: function(response, opts) { var obj = Ext.decode(response.responseText); console.dir(obj); button.setText (obj.server); }, }); } What this code does is make a call to the version REST API, create a JavaScript object with the resulting JSON (decode), display the data on the browser console, and display the server field as button text. Defining a Data Model This just proves that the JavaScript application can invoke RAD Server. Next I moved to the data processing. ExtJS has the concept of a data model, so using the visual tool I created a simple one like the following: Ext.define('MyEmployeeApp.model.EmployeeData', { extend: 'Ext.data.Model', requires: [ 'Ext.data.field.Field' ], fields: [ { name: 'first_name' }, { name: 'last_name' }, { name: 'phone_ext' }, { name: 'dept_no' }, { name: 'job_country' } ] }); Returning JSON from RAD Server Next, I had to define a data store. First I used an AJAX data store and to keep things simple I wrote a custom method in RAD Server to expose a plain JSON data structure, built using the TJSONObject and TJSONArray classes. In this code EmployeeTable is a TFDQuery dropped in the data module along with a connection to the classic InterBase employee demo database: procedure TEmployeeDataResource1.Get(const AContext: TEndpointContext; const ARequest: TEndpointRequest; const AResponse: TEndpointResponse); var empDataObj: TJSONObject; data: TDataSet; emplArray: TJSONArray; emplObj: TJSONObject; aField: TField; begin data := EmployeeTable; data.Open; empDataObj := TJSONObject.Create; emplArray := TJSONArray.Create; while (not data.EOF) do begin emplObj := TJSONObject.Create; for aField in data.Fields do begin emplObj.AddPair(LowerCase(aField.FieldName), aField.AsString); end; emplArray.Add(emplObj); data.Next; end; empDataObj.AddPair ('employee', emplArray); AResponse.Body.SetValue(empDataObj, True); end; This is the resulting JSON in a browser: With this code and the use of an AJAX call, the JavaScript application by default ends up with with cross-server invocation security problems, when executed in the browser. There is  however a fairly simple solution in RAD Server, which is set a single line in the EMS.INI file, with a configuration like: [Server.APICrossDomain] ;# Write here the domains allowe[...]



Talking at ITDevCon 2017, Tomorrow

2017-10-10T15:46:21.332Z

I realized I failed to mention I'm going to talk at a conference in Rome, Italy, tomorrow October 11th and Thursday the 12th,

The conference is organized by Embarcadero partner BitTime and their consulting company BitTime Professionals at their office in Franscati, near Rome, and all of the information is at:

http://www.itdevcon.it/

Well, it might be a little late to join, but I realized I forgot mentioning the event on my blog, so here it goes. If you plan attending, I'll be there tomorrow afternoon and also join the dinner. See the final agenda at http://www.itdevcon.it/agenda

I'll be giving a keynote on the status of RAD Studio, but also two technical sessions covering FireDAC CData Enterprise connectors and offering an introduction to Sencha's ExtJS and Architect tool, along with demos of integration with Delphi powered back ends. Would be interesting, and I'll make sure to share my demos with everyone -- and possibly repeating them at the coming CodeRage online conference next month.

(image)



My Courses on the New Embarcadero Academy

2017-10-04T15:21:10.460Z

Embarcadero Academy launched last month, and I do have 3 classes on the Object Pascal language on it, with more to come.

The online training site Embarcadero Academy, an independently-run but Embarcadero affiliated training web site, was launched a couple of weeks ago: http://www.businesswire.com/news/home/20170918005798/en/Embarcadero-Academy-Debuts-Online-Courses-Developers-Levels. The academy features classes on different topics, but a lot of them are focused on Delphi programming. You can see the list of Delphi classes here:

https://www.embarcaderoacademy.com/courses/category/Delphi

The site has paid online classes by several Delphi experts and it is going to be expanded rapidly with new content and options (live training, beside self-paced tutorials, subscriptions, etc). The classes are mostly video oriented and, in my case, they are slide free and focused on code.

(image) I have currently 3 classes listed, two on interfaces (and there is a bundle to get both at once, as shown in the image) and one on generics. Another one on anonymous methods is in the works. As you can see my initial effort is to focus on the most recent and more complex features of the Object Pascal language, with content that matches my book but is presented in a different way. What I do, in fact, is building the example step by step, showing the feature but also reasoning on alternative coding options and ideas. I plan expanding my contribution completing the advanced area (RTTI, reflection, attributes), and add more core topics (properties and events, classes and objects, etc) and possibly even beginners Pascal material. Ideas are welcome. As an example, the bundle shown and linked here with the two classes on interfaces and my ebook, is currently priced at 29 US$. See https://www.embarcaderoacademy.com/p/interfaces-in-delphi-intro-to-advanced for more information.

(image)



Why I Choose Delphi Summary

2017-10-03T10:58:51.667Z

Over the summer, there has been a number of blog posts on this topic, but I haven't seen a complete list. Here it goes.

Over the summer, there has been a number of blog posts on the "Why I Choose Delphi?" topic. While providing personal ideas, they do have common themes and I think there are very interesting to read, for anyone who is using Delphi today (or used it in the past). Here is the list of the blogs I noted, and I migh have missed others, let me know:

David Harper: https://csvelocity.wordpress.com/2017/07/27/why-i-choose-delphi/

Andre Celestino: http://www.andrecelestino.com/why-i-choose-delphi/

Frank Lauter: http://delphiprofi.blogspot.it/2017/08/whyichoosedelphi.html

Ryan Potts: https://rpottsoh.github.io/Why-I-Choose-Delphi/

Jim McKeeth:  https://community.embarcadero.com/blogs/entry/why-i-keep-choosing-delphi and http://delphi.org/2017/08/why-i-keep-choosing-delphi/

Steffen Nyeland: https://fixedbycode.blogspot.it/2017/08/why-i-keep-preferring-delphi.html

Ray Konopka: https://delphibydesign.com/why-i-choose-delphi/

Jens Fudge: https://community.embarcadero.com/blogs/entry/why-i-choose-delphi

 Robert Calco: http://www.hitcompileandrun.com/2017/08/why-i-choose-delphi.html

"T Theobald":  http://borkedcode.com/wp/?p=1511

(image)



InterBase 2017 Update 1 and Delphi

2017-09-29T09:56:01.799Z

Embarcadero has just released an updated version of the InterBase 2017 database, with improved performance and platform support.

(image) A few months after the InterBase 2017 release, Embarcadero has just made available InterBase 2017 Update 1. If you are an existing InterBase user, this is a nice update the install, given it has some performance improvements, bug fixes, and new features, as explained in the announcement article I just publsihed at:

https://community.embarcadero.com/article/16575-interbase-2017-update-1-is-now-available

InterBase is a great embedded database, and the IBLite/IBToGo versions come included with RAD Studio for all supported platforms (desktop and mibile). The Windows developer edition of the full RDMBS (a fast, hassle free, fully powered SQL engine) is also included in RAD Studio and helps power the RAD Server database. Not only InterBase is on par with most competing (and often more expensive) solution, but it has unique features like ChangeViews that can be leveraged to greatly optimize the data traffic, something even more important in today's mobile and distributed world.

While RAD Studio Tokyo ships with the previous version, InterBase XE7, the InterBase 2017 versions of the developer server and IBLite/IBToGo are available in GetIt -- currently still the original release, Udpate 1 will be made available early next week. Read the linked article above for current download links and more information on this version of InterBase.

 

(image)