Nice write up, Tim. Thanks! > On Apr 9, 2018, at 7:06 AM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > I got back from 4D Summit 2018 in Washington DC and thought I’d post a few of > my thoughts and comments about this year’s summit. > > I went to JPR’s advanced class and he made a statement at the end that I > think really sums of 4D v17. He said this is the biggest update in the > history of 4D. Bigger than 4D v3 and 4D Server v1 with multiple processes and > windows. And v17 is only the beginning of the changes that are coming. > > There are more features and changes that are far along in development that > will be released in v17 R releases and in v18 that will position 4D as the > premier, cross-platform RAD package combining an integrated client/server > database that has a ORDA interface. There is nothing out there can come close > to it. Particularly when you realize this is a cross-platform solution. > Compiled, native macOS and Windows versions of a piece of software from the > same source code. Integrated, powerful client/server database included. The > same piece of software can run as a single-user application or as a > client/server application. Tell me who else is doing that? And don’t forget > “4D for iOS” as the delicious cherry on top! We’ve got a software application > development system that is going to be very hard to beat. > > What is ORDA? It is not a “a historical sociopolitical and military structure > of Mongol Eurasia”. This is a new term that 4D has created. It stands for > Object Relational Database Access. I’m guessing in a few years if you Google > ORDA that will be for number one link. > > ORDA is coming to the 4D language. That is why we have the “dot notation” > option for the method editor. It is needed for ORDA. I think a quick way to > summarize ORDA is to say “if you know how Wakanda did database access with > JavaScript that is what ORDA is in the 4D programming language”. 4D is > bringing the advanced object oriented database access that Wakanda has to 4D. > This is going to change the way you will WANT to program in 4D. > > I say “want” because if you are happy using the 4D language the way it is now > and has been for 25+ years you are free to continue to do that. JPR calls it > “classic 4D”. It will continue to work exactly as it has before. But if you > use the new ORDA method you will reap many benefits. Easier to read code, > fewer lines of code, complete control of exactly what relations are used > between tables to retrieve data and big speed improvements. That’s right, > using ORDA to accomplish a relational database lookup and data retrieve task > can in many situations be much faster than doing the same thing with a series > of “classic” 4D language commands. So for all you “speed hounds”, you are > going to want to use ORDA. (Side note: when Laurent designed the 4D v11 > database engine he had in mind ORDA and planned for the optimizations. This > thing has been in development for many, many years.) > > If you have used Wakanda or know how it accesses the 4D database in an object > oriented way, you already know how to use ORDA in 4D. That’s because it uses > basically same syntax as Wakanda. In my opinion this the beginning of > bringing all that is great about Wakanda and making it an integral part of > 4D. Use it if you want, or ignore it and continue to use the classic > programing language. Or use them both. You have a choice. > > When I heard about the 4D Summit Advanced class and that JPR would also > joined by Laurent I knew something special was coming to 4D. (Laurent had to > be there because the subject matter was so new and broad that JPR would not > have answers to all questions. And that turned out to be true.) I thought > they were going to introduce a new language to 4D. JavaScript for 4D. My > visions were that there would be “Begin JavaScript” and “End JavaScript” > commands like they “Begin SQL” and “End SQL” commands that would let you > write JavaScript and do fancy things like you can do in Wakanda with > JavaScript. I was wrong. There is no JavaScript support in 4D, and there > probably never be — outside of web areas. > > Many, many changes to the 4D language are coming. I sat at a table with > Laurent and some other 4D developers at lunch one day and Laurent said the > new 4D language will be “JavaScript inspired”. He intends to add features to > the 4D language so that it will be even better than JavaScript! Inheritance, > error handling, custom data classes and the list goes on and on. The days of > the 4D language not getting updated are over. The changes are just getting > started. Reminds me of that movie where the character says “Badges? we don’t > need no stinking badges”. JavaScript? We don’t need no stinking JavaScript. > We are going to have something better. This is good news! > > One example of a change in the 4D language is the “For each” loop control > structure. Super useful and needed when dealing with objects and containers. > More is coming. The doors to the 4D Engineer’s cages in France have been > opened and they are going to begin running wild attacking problems and > limitations we have had for many years with the language. Making things > easier to do. And making things that were not possible before, possible now. > This is good news! > > So you want an example of ORDA and changes to the 4D language? Here’s one > form JPR’s advanced class. (Hope I am not doing copywriter infringement > here.) > > You have a table called “Employee”. Just one table. It has a “managerID” > field and has a relation back to the “ID” field of the same table. (Yeah, > that’s not possible in the current version of 4D, but it is in v17.) The name > of the relation is “manager”. Find all Employees working for a manager whose > “firstname” is “Laurel”. Here is how you would do it now: > > QUERY([Employee];[Employee]firstname="Laurel") // First Query > ARRAY LONGINT($arIDs;0) > SELECTION TO ARRAY([Employee]ID;$arIDs) > QUERY WITH ARRAY([Employee]managerID;$arIDs) > > That gives you a selection of [Employee] records. Here is how you do it via > ORDA in v17: > > $entSel:=ds.Employee.query("manager.firstname = ‘Laurel’ “) > > That is it. One line of code. That gives you an entity collection which is > very much like a selection of records. And this is faster than QUERY, > SELECTION TO ARRAY and QUERY WITH ARRAY. > > And it can be recursive. Say you want to find the managers of the managers > whose name is “Laurel”. You do it like this: > > $entSel:=ds.Employee.query("manager.manager.firstname = ‘Laurel’ “) > > 4D Summit 2018 would not be complete without mentioning 4D for iOS. I called > it the “delicious cherry” and it is. This is a component that 4D is creating > to allow you to create an iOS application. The potential here is huge. They > are only at the beginning of the development of this product. They have not > decided on the pricing yet. Total feature set it still unknown. But we got a > taste of what is possible with this component. > > The component is preinstalled in v17 and is integrated into the “File” menu > so you can select a menu item to create a new “iOS Project”. That opens a > window that lets you define the project. Select tables and fields you want to > provide access to in the iOS application. Select templates for how it will > look in the list views and detail views. Then click a “Build” button. That > generates a complete XCode project folder with all needed files, tells XCode > to build the project and then launches the built iOS application in the iOS > Simulator application on your Mac so you can test it. It connects to a 4D > Server using the 4D Mobile interface. Data is cached to the iPhone and saved > to a “local data store” so it is fast and does not required a constant > connection to 4D Server to use it. First version of 4D for iSO is read only, > but later versions will allow changing data on the iPhone and having it > automatically sync back to 4D Server. > > This is a real iOS application created by XCode. So you can build an app and > submit it to the Apple App Store if you want. Make a million bucks if you > can. Or you can submit to the Enterprise App Store and distribute it > privately to select people in the company you are developing it for. The > wheels start turning in your mind about what is possible now. I already have > one client that is begging for an iOS app to access their 4D Server > application. I think this will be the ticket to making that happen for a > price they are willing to pay. And they will pay me for this instead of > another iOS application developer that I would have to contract to build the > iOS app. This is good news! > > 4D Summit 2018 was a big event. Many new technologies were presented. They > gave a hint of roadmap for the future and what was possible. Spending an hour > at lunch with Laurent was inspiring. Work that he and the 4D Engineering team > have doing for the last 5+ years are now coming to fruition. Things are ready > to be put into a production product and distributed to developers. He built > it for us to use. He wants it to be right and of high quality. It is > something he is proud of. You can tell that when you speak to him about it. > He is excited about what is going to be released. And he’s not done yet. He > has more in the pipeline. This is just what is ready now. More is coming. > This is good news! > > Tim > > ***************************************** > Tim Nevels > Innovative Solutions > 785-749-3444 > timnev...@mac.com > *****************************************
********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************