Smart Pascal dataset
As I have mentioned earlier in my posts, Smart Pascal have no default database framework. Smart Mobile Studio (which is the #1 compiler for Smart Pascal) have wrappers for all the various browser database engines, so using them is greatly simplified for Smart programmers — but there are no such things as datasets, field objects and any of the standard stuff we are used to under Delphi or Freepascal.
Well, today I had enough and started writing the basics!
The cool part is that dealing with data is, believe it or not, much easier in Smart Pascal than under native Delphi. For instance, a row of data (a data packet) is stored in JSON format, and JavaScript’s live prototype nature makes it extremely elegant to read, write and update a large collection of packets. Being able to read, write and update data from your server or the cloud is, to my surprise.. easy as apple pie!
For instance, what is a record? Answer: It is a collection of persistent, named field objects. Under JavaScript that can be easily represented as a JSON object – or “array of named variants” in Object Pascal terms. So you get the naming of data free of charge, because that’s how JavaScript works. And you also get the serialization of data free of charge, because that’s how JSON works. So roughly 25% of the work required by “native” languages in order to represent a dataset – is already done. Pretty cool huh? 🙂
And yes, this code will work under any Smart Pascal compliant system. DWScript, Smart Mobile Studio and Quartex Pascal. But it will ship first and foremost with Smart Mobile Studio.
And now for something completely different
Bored? Check out the TV series “Silicon Valley” from HBO, I laughed so hard I nearly broke a rib. The series if a complete rip-off from the british “IT crowd” (even the music), but it reminded me so much of Borland vs. Microsoft that I nearly fell out of my couch 😀
Recent
The vatican vault
- January 2022
- October 2021
- March 2021
- November 2020
- September 2020
- July 2020
- June 2020
- April 2020
- March 2020
- February 2020
- January 2020
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- February 2013
- August 2012
- June 2012
- May 2012
- April 2012
You must be logged in to post a comment.