Thursday, October 23, 2014

My New Object Pascal Handbook

I'm working on a new book covering Delphi's Object Pascal language from the ground up to the most advanced features. And you can get a draft today as part of an Embarcadero promotion.

I'm working on a new book covering Delphi's Object Pascal language from the ground up to the most advanced features.

Getting the Ebook

You can get a draft of the ebook (in PDF format) today as part of an Embarcadero promotion:  It is free if you buy Delphi XE7 in the next month (taking advantage of the "upgrade for all"  promo) , or if you are a registered user:

Promo: www.embarcadero.com/radoffer

Ebook: cc.embarcadero.com/item/30018

Book Information

Some information about the book (including the list of final chapters -- currently 70% is available) is in a specific page of my old web site:

www.marcocantu.com/objectpascalhandbook/

For feedback and information I created two community pages:

Facebook: www.facebook.com/objectpascalhandbook

Google+: bit.ly/objectpascalgplus

And the code repository (still not complete) is at:

code.marcocantu.com/trac/marcocantu_objectpascalhandbook

A Book on Object Pascal

Enough links. What's the scope and the goals of the book. Let me copy some of the introduction text over:

" Power and simplicity, expressiveness and readability, great for learning and for professional development alike, these are some of the traits of today's Object Pascal, a language with a long history, a lively present, and a brilliant future ahead.

Object Pascal is a multi-facet language. It combines the power of object-oriented programming,  advanced support for generic programming and dynamic constructs like attributes, but without removing support for more traditional style of procedural programming. A tool for all trades, with compilers and development tools embracing the mobile era. A language ready for the future, but with solid roots in the past.

What is the Object Pascal language for? From writing desktop apps to client-server applications, from massive web server modules to middleware, from office automation to apps for the latest phones and tablets, from industrial automated systems to Internet virtual phone networks... this is not what the language could be used for, but what it is currently used for today, in the real world.

The core of the Object Pascal language as we use today comes from its definition in 1995, a terrific year for programming languages, given that this was the year Java and JavaScript were also invented. While the root of the language dates back to its Pascal ancestor, its evolution didn't stop in 1995, with core enhancements continuing as of today, with the desktop and mobile compilers build by Embarcadero Technologies and found in Appmethod, Delphi, and RAD Studio."

The Book's Approach to the Language

"Given the changing role of the language, its extension over the years, and the fact it is now attracting new developers, I felt it important to write a book that offers complete coverage of the Object Pascal language as it is today . The goal is to offer a language manual for new developers, for developers coming from other similar languages, but also for old timers of different Pascal dialects that want to learn more about recent language changes. 

Newcomers certainly need some of the foundations, but given changes have been pervasive even old-timers will find something new in the initial chapters.

Beside a short Appendix covering the short history of the Object Pascal language, this book was written to cover the language as it is today. A large part of the core features of the language hasn't changed significantly since the early versions of the Delphi, the first implementation of modern Object Pascal in 1995.

As I'll hint throughout the book, the language has been far from stagnant during all of these years, it has been evolving at quite a fast pace. In other books I wrote in the past, I followed a more chronological approach, covering classic Pascal first, and following extensions more or less as they appeared over time. In this book, however, the idea is to use a more logical approach, progressing through the topics and covering how the language works today, and how to best use it, rather than how it evolved over time. As an example, native data types dating back to the original Pascal language have method-like capabilities (thanks to intrinsic type helpers) introduced recently. So in Chapter 2 I'll introduce how to use this feature, although it won't be until much later than you'll figure out how to make such custom type extensions.

In other words, this book covers the Object Pascal language how it is today, teaching it from the ground up, with only a very limited historical perspective. Even if you have used the language in the past, you might want to skim thought the entire text looking for newer features, and not focus only on the final chapters."

Going Forward

So what's next? I plan finishing the book before the end of the year, and Embarcadero will likely make updates available to active customers. After I get some feedback from readers, and finish cleaning up the text and the demos, I'll publish a printed version of the book. That's expected next year. Needless to say feedback is welcome, using one of the pages mentioned above or eve direct email.

Happy reading. That's my 16th Delphi-related book, hope it is useful as most of the previous ones.

 





Tuesday, October 21, 2014

Speaking at ITDevCon 2014

Next Thursday, October 23rd, I'll be giving a Delphi XE7 keynote at ITDevCon in Milan, Italy.

Next Thursday, October 23rd, I'll be giving a Delphi XE7 keynote at ITDevCon in Milan, Italy. This is one of the Delphi conferences closest to home, given it moved from Verona (where it was help over the last few years -- Delphi Day in Piacenza still beats it, though).

Anyway, I'll be giving a keynote at this conference, that has a high quality group of speakers under the lead of Daniele Teti, including Jeroen Pluimers, Paolo Rossi, Boian Mitov, Stefan Glienke, André Mussche, and quite a few others). ITDevCon is generally quite a nice and technically in-depth conferences, we'll see how the new location will work this year.

For any information, last minute sign ups, or any other detail, head to  http://www.itdevcon.it/en  or the Italian counterpart. BTW, sessions will be both in English and Italian.

 

Monday, October 20, 2014

CodeRage 9 Coming Next Week

Next week Embarcadero technology will host the its 9th free, online developers conference, with parallel tracks covering Delphi XE7 and C++Builder XE7.

Next week Embarcadero technology will host the its 9th CodeRage, a free online developers conference, with parallel tracks covering Delphi XE7 and C++Builder XE7. The CodeRage conference is known for its great content, long hours of sessions, live Q&A with speakers from around the world. Topics cover new products features but also core technologies and foundations, with many MVPs and luminaries presenting along side Embarcadero evangelists, sales consultants, product managers, and members of the RAD Studio R&D team.

All of the sessions times and details are available at www.embarcadero.com/coderage along with the (free) sign up form. Register today, so you won't forget the dates, which are  Tuesday to Thursday  next week (October 28th to 30th). There are over 80 technical sessions not to be missed on a wide variety of topics. My suggestion: reserver the time, join the sessions live, and join the conversation with the speakers and thousands of other fellow developers.

I'll be giving quite a few sessions for CodeRage 9, in both tracks, which reminds me I'll have a busy week preparing them all! Here are my currently planned sessions:

Object Pascal Sessions:

  • Object Pascal Opening Keynote
  • Modernizing VCL Applications
  • What's New in the Object Pascal Language
  • Enterprise Mobility Services: Working with SQL Databases
  • The Life of an Object Pascal Public Store App

C++ Sessions:

  • Modernizing VCL Applications
  • The Life of a Public Store App
  • Enterprise Mobility Services: Working with SQL Databases

Stay tuned for next week, it will be really fun.

 

Delphi XE7 Blogs of the Week #20

Another bi-weekly round of updates, regarding Delphi, applications, third party, and more.

Another bi-weekly round of updates, regarding Delphi, applications, third party, and more.

XE7 Updates and HotFixes

More XE7 Information

General Delphi Information and New Delphi Apps

And More Embarcadero News

 

Friday, October 17, 2014

2014 Conference in Brazil

Yesterday in Sao Paulo myself and Jim McKeeth gave session at the largest Delphi event of the year, a great gathering of passionate developers.

Yesterday in Sao Paulo myself and Jim McKeeth gave session at the largest Delphi event of the year, a great gathering of passionate developers. With over 600 Delphi developers attending this was really a big event, with a perfect organization, and many great speakers, mostly local Delphi MVPs who really know and care about the product. I got "millions" of picture on Facebook and Twitter, but here there are a few more.

Before that, just let me say I had a great reception, my keynote pushed the idea Delphi is alive and kicking around Windows development, single-source multi-device mobile development, and support for the Internet of Things. In two words, "Delphi Everywhere". Enough said. Here are some more pictures taken by Fernando and myself, plus a couple I grabbed form social media. More pictures on twitter.com/marcocantu and www.facebook.com/marcocantu.

 





Monday, October 13, 2014

Open Source "TurboPack" Components for XE7

An important set of open source components has been migrated to XE7 and is now available. These includes some of the former Turbo Power components, plus a few others.

An important set of open source components has been migrated to XE7 and is now available. These includes some of the former Turbo Power components, plus a few others. This is why we are thinking of referring to them as "TurboPack".

The work has been done by Roman Kassebaum (with a little help by us), as you can read on blog.kassebaum.eu/ with the goal of making sure the components work on XE7, and both in Delphi and C++Builder, but also clean their source code of pre-Unicode IFDEFs, taking advantage of new language and RTL features, and migrating some of them to support mobile.

The set of components includes:

  • Orpheus (Win32 and Win64)
  • Abbrevia (Win32, Win64, MacOSX, iOS and Android)
  • Virtual Tree (Win32 and Win64)
  • SynEdit (Win32 and Win64)
  • LockBox (Win32, Win64, MacOSX, iOS and Android)
  • Async Professional (Win32)
  • PowerPDF (Win32 and Win64)

You can also read comments in the forums at https://forums.embarcadero.com/thread.jspa?threadID=109226&tstart=0 (when it works) and on the Google+ Delphi Community at plus.google.com/u/0/+MarcoCantu/posts/YJ3Pc4YaWzg

Thursday, October 9, 2014

RAD Studio Hotfixes for BMP Buffer Overflow and PAServer

There are two new hotfixes for Delphi and C++Builder XE7, XE6, and one also for XE5.

There are two hotfixes for different versions of RAD Studio that have been released over the last few days. All of these fixes are listed in the registered users download page at cc.embarcadero.com/myreg (notice they are sorted by version first, and date next).

Bitmap Buffer Overflow

This issue was already fixed about a month ago, but the new fix is more comprehensive and covers other corner cases. This is an important fix as it makes VCL applications vulnerable to attacks:

The fix will also be included in a future XE7 update 1, of course. For older versions, manual steps are available in the support site at support.embarcadero.com/article/44015.

PAServer Issues with Simulator

This fix relates with issues with the new iOS 8 simulator, and allows you (as a temporary work around) to use the iOS 7.1 simulator:

The readme with some information is available at www.fmxexpress.com/xcode-6-ios-7-1-simulator-hotfix-for-delphi-xe6-firemonkey-paserver/

A Subtle Delphi TRegEx Change

A subtle change in the TRegEx class defaults can cause some incompatibilities with pre-XE6 versions of Delphi (and C++Builder) code.

Last month I was approached by a customer who was migrating code from XE2 and saw some incompatibilities (or actually some bugs) in the way regular expressions are processed in the TRegEx class. He pointed out that using:

  RegEx := TRegEx.Create(sPattern);
  Match := RegEx.Match(sInput);

would work properly, while forcing the expressions to compile (for extra performance, if the same expressions is applied multiple times), like in the following code will basically break the regular expressions engine:

  RegEx := TRegEx.Create(sPattern, [roCompiled]);
  Match := RegEx.Match(sInput);

This looked really a bug and I noticed the difference was that with the compiled expression there was an extra match (and skipping it with the NextMatch call things would work). I asked to the R&D team and it turns out this change was done specifically to fix a real limitation (qc.embarcadero.com/wc/qcmain.aspx -- submitted by Jan Goyvaerts, who originally wrote the library and fixed in XE6).

What happens is that older version of TRegEx didn't support "empty matches", while now they do. To preserve the behavior, the structure is created with the roNotEmpty flag tunred on:

constructor Create(const Pattern: string; Options: TRegExOptions = [roNotEmpty]);

So you can now disable the option PCRE_NOTEMPTY (or roNotEmpty) using:

RegEx := TRegEx.Create(sPattern, []);

However, if you pass a different value to the constructor, the "not empty" is not applied. Once you know about this change, the workaround is add this option explicitly, so the "compiled" code above should read:

RegEx := TRegEx.Create(sPattern, [roNotEmpty, roCompiled]);”

By the way, TRegEx support has also been enhanced in XE7 to use a newer version of the library (PCRE 8.35) on Windows and mobile, while on Mac and for iOS simulator the TRegEx code binds to the version of the library available on the system. You can read this at docwiki.embarcadero.com/RADStudio/XE7/en/What%27s_New_in_Delphi_and_C%2B%2BBuilder_XE7#PCRE_8.35_for_Windows_and_Mobile_Platforms.

Now it is debatable if this is optimal (as there might be subtle differences, while using system libraries helps reduce the application footprint), but that's not the real point of this blog post.

Monday, October 6, 2014

Embarcadero Conference Brazil, Next Week

Next week I'll speak for the first time at the Embarcadero Conference in Brazil, a large gathering of local, mostly Delphi developers in Sao Paulo.

On Thursday next week, October 16th, I'll speak for the first time at the Embarcadero Conference in Brazil, a large gathering of local, mostly Delphi developers in Sao Paulo. While I was invited few times in the past, this is the first time I'll be attending... and I know a lot of Brazilian developers who read my Delphi books in the past are going to be there... But the conference will have much more content and a long list of great speakers. There will be Jim McKeeth joining from the US and showing his spectacular device interaction demos. Most of the 24 technical sessions (in 4 parallel tracks) will be given by local experts in Portoguese and I'll do a keynote (and a technical session) in English.

This is going to be a great event for all  Brazilian developers (likely the best developer conference of the year for Delphi developers and possibly one of the largest world wide) and I'm really looking forward to be there. Feel free to come and have a chat with me, stop by for a selfie, ask for a feature you'd like to see in the product, or get a book signed!

See all of the information, the complete agenda, and the sign up form at  www.embarcaderoconference.com.br/evento.html . If you live in Brazil, don't miss the "5 edição da Embarcadero Conference".





Thursday, October 2, 2014

Delphi XE7 Blogs of the Week #19

As usual, more than a week went by, and this is why this list of blogs is quite long. Lots of nice content from the Delphi world and beyond.

As usual, more than a week went by, and this is why this list of blogs is quite long. Lots of nice content from the Delphi world and beyond.

Delphi XE7 Technical Information and Additional Packages

General Delphi Blog Posts

Written in Delphi

And We Have Books!

And Third Party Tools

That's all for this couple of past weeks...