domingo, 31 de agosto de 2014
mORMot + Ratchet + SMS
POST #036 =======================================================================
quarta-feira, 30 de julho de 2014
Convert .PAS to .JS
POST #035
=======================================================================
Object Pascal to Javascript? I've created a small Bank Account Simulator System application powered by the old Delphi 7 and use a command-line compiler to convert pascal code to pure javascript.
Tags: pascal to javascript; object pascal to javascript; smart mobile studio compiler command line.
Object Pascal to Javascript? I've created a small Bank Account Simulator System application powered by the old Delphi 7 and use a command-line compiler to convert pascal code to pure javascript.
Tags: pascal to javascript; object pascal to javascript; smart mobile studio compiler command line.
segunda-feira, 30 de junho de 2014
Delphi with MongoDB
POST #034
=======================================================================
Bye, bye Chile.
After a tense match, Brazil breathes giant sight of relief and defeats Chile on penaulties and advanced to the quarter-finals of the World Cup 2014.
BTW, if you don't know, Chile is fortunate to have climate conditions that are ideal for good wine grapes.
Guess what? I've created a small Wine Cellar application powered by Delphi mORMot with MongoDB! Take a look at Christophe Coenraets blog here: http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/. This is a wine cellar management application, allows you to manage, add, retrieve, update and delete the wines in a wine cellar MongoDB database.
Brazil breathed again.
Bye, bye Chile.
After a tense match, Brazil breathes giant sight of relief and defeats Chile on penaulties and advanced to the quarter-finals of the World Cup 2014.
BTW, if you don't know, Chile is fortunate to have climate conditions that are ideal for good wine grapes.
Guess what? I've created a small Wine Cellar application powered by Delphi mORMot with MongoDB! Take a look at Christophe Coenraets blog here: http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/. This is a wine cellar management application, allows you to manage, add, retrieve, update and delete the wines in a wine cellar MongoDB database.
Brazil breathed again.
Tags: MongoDB with Delphi; mORMot with MongoDB; CRUD with MongoDB and Delphi.
sexta-feira, 23 de maio de 2014
Shopping cart with Delphi mORMot
POST #033
=======================================================================
I've created an experimental shopping cart with Delphi 7 which generates HTML. It is a single page application which will have multiple views. I'm using mORMot to render mustache templates. I defend that server-side rendering with mORMot will be always faster than on client side rendering.
When a dynamic page is executing on the server-side, browser is doing nothing but waiting for the HTML to come from the server-side. Here, mORMot code takes only 15ms to perform rendering of my SPA (single page application). By the time server finishes doing its work, server will just send the dynamic content and browser will be able to render it right away. Of course JS/CSS files are loaded only after the page is delivered to the browser.
I've been thinking if I could render a template without refresh the page. Yes, I can. Oh, I have a question: I’m using a external shared template, I’ve been wondering, if this page generated concurrently would become an issue. Are there possibility this become a messed up, a user see another rendered template, for example? Answer is: No, no, TSynMustache is thread-safe, per dedicated template.
Neither javascript framework required nor json on client side, just jquery and mustache templates on server side.
Tags: shopping cart; jquery with delphi; mORMot web server.
I've created an experimental shopping cart with Delphi 7 which generates HTML. It is a single page application which will have multiple views. I'm using mORMot to render mustache templates. I defend that server-side rendering with mORMot will be always faster than on client side rendering.
When a dynamic page is executing on the server-side, browser is doing nothing but waiting for the HTML to come from the server-side. Here, mORMot code takes only 15ms to perform rendering of my SPA (single page application). By the time server finishes doing its work, server will just send the dynamic content and browser will be able to render it right away. Of course JS/CSS files are loaded only after the page is delivered to the browser.
I've been thinking if I could render a template without refresh the page. Yes, I can. Oh, I have a question: I’m using a external shared template, I’ve been wondering, if this page generated concurrently would become an issue. Are there possibility this become a messed up, a user see another rendered template, for example? Answer is: No, no, TSynMustache is thread-safe, per dedicated template.
Neither javascript framework required nor json on client side, just jquery and mustache templates on server side.
Tags: shopping cart; jquery with delphi; mORMot web server.
quarta-feira, 23 de abril de 2014
Reports on demand using Smart Mobile + Datasnap
POST #032
=======================================================================
SmartMS has some basic controls,but there a lot of missing controls. So I have decided to implement an example using a weird approach: put controls by hand using HTML templates but code is done with pure pascal SmartMS, no visual designer is used in this example, I have just bind smart pascal to javascript in HTML templates. This mini-video is intended to demonstrate the use of a web service (is a REST DataSnap server) that provides reports on demand to mobile client applications created with Smart Mobile Studio.
Tags: Remote service with datasnap; reports on demand with datasnap; datasnap with smart mobile studio.
SmartMS has some basic controls,but there a lot of missing controls. So I have decided to implement an example using a weird approach: put controls by hand using HTML templates but code is done with pure pascal SmartMS, no visual designer is used in this example, I have just bind smart pascal to javascript in HTML templates. This mini-video is intended to demonstrate the use of a web service (is a REST DataSnap server) that provides reports on demand to mobile client applications created with Smart Mobile Studio.
Tags: Remote service with datasnap; reports on demand with datasnap; datasnap with smart mobile studio.
segunda-feira, 3 de março de 2014
Web service with MS Excel and Delphi
POST #031
=======================================================================
Hi everyone, welcome back, thanks for listening, if you like this video I'm warleyalex from the beautiful Seven lakes, Brazil. otherwise I don't know anything about it... Today I’m gonna talk web services with Microsoft Excel 2003. If you don’t know, Web Services are reusable applications that expose an interface that can be accessed over the internet. Web services generally use XML to provide a platform and language independent implementation of distributed application services and information.
Web services allow us to utilize the services provided by the other organizations. We can consume the web services not only from applications developed using various programming languages but also from Microsoft office tools like Access, Excel, and Word etc. In this mini-video we will explore how we can access a web service from Microsoft Excel using Delphi mORMot!
I was trying to write some VBA code in Excel 2003 that would consume a web service created with Delphi. So I would like to create in pure VBA (visual basic for application) without installing any plugins, neither opening up Visual Studio, nor other hacks. Some fun features include strong authentication, URI signatures and JSON support (thanks to vba-json).
I’m using a REST server. REST is simple enough in practice that it doesn't really need a toolkit. All it requires is support for HTTP, which VBA offers through the MSXML2.XMLHTTP object. Using this object, you can create HTTP requests and process the responses. There's no need to use the Microsoft Office Web Services Toolkit for this example; the VBA code for the button in alone is all you need.
It's working awesomely in my Excel 2003 (and most likely 2010), but does not work on Excel for Mac due to missing XMLHTTP libraries. I think it should work with pretty much any REST webservice. In my opinion Microsoft would like to have VBA dead and it is pushing dot net solutions for Office.
This example, includes a web service, which returns CEP (code postal) according to the address you request. Actually, user can find any Address here in Brazil, for instance, when a user types a street, avenue starting with letter B, web service will return all data address starting with B, in all over Brazil, this is really big result. My database has more than 200 megabytes. Actually, this database contain more than 900 thousands records, 45,738 districts and 10,698 places.
My mormot_excel.xls sheet accesses the web service and displays the data provided by the webservice. Clicking on the clear button clears the data from the Excel sheet).
The REST HTTP version is both simpler and more portable, you can create this with Android platform and demands less code on the server side as well. Why wouldn't you use REST rather than SOAP throughout your work? If you control both ends of the transaction, this is a very appealing option, as it lets you use whatever web tools you like, not just tools specifically oriented toward SOAP web services. However, there are many services that are available only through SOAP, and a growing number of programmers who know how to work with SOAP. It's best to have both approaches in your toolbox. Now our little mORMot supports authentication using Delphi, javascript, java-android and visual basic for applications. This is very nice, isn’t it?
Tags: Remote service with Excel; webservice with Excel; CEP with Excel.
Hi everyone, welcome back, thanks for listening, if you like this video I'm warleyalex from the beautiful Seven lakes, Brazil. otherwise I don't know anything about it... Today I’m gonna talk web services with Microsoft Excel 2003. If you don’t know, Web Services are reusable applications that expose an interface that can be accessed over the internet. Web services generally use XML to provide a platform and language independent implementation of distributed application services and information.
Web services allow us to utilize the services provided by the other organizations. We can consume the web services not only from applications developed using various programming languages but also from Microsoft office tools like Access, Excel, and Word etc. In this mini-video we will explore how we can access a web service from Microsoft Excel using Delphi mORMot!
I was trying to write some VBA code in Excel 2003 that would consume a web service created with Delphi. So I would like to create in pure VBA (visual basic for application) without installing any plugins, neither opening up Visual Studio, nor other hacks. Some fun features include strong authentication, URI signatures and JSON support (thanks to vba-json).
I’m using a REST server. REST is simple enough in practice that it doesn't really need a toolkit. All it requires is support for HTTP, which VBA offers through the MSXML2.XMLHTTP object. Using this object, you can create HTTP requests and process the responses. There's no need to use the Microsoft Office Web Services Toolkit for this example; the VBA code for the button in alone is all you need.
It's working awesomely in my Excel 2003 (and most likely 2010), but does not work on Excel for Mac due to missing XMLHTTP libraries. I think it should work with pretty much any REST webservice. In my opinion Microsoft would like to have VBA dead and it is pushing dot net solutions for Office.
This example, includes a web service, which returns CEP (code postal) according to the address you request. Actually, user can find any Address here in Brazil, for instance, when a user types a street, avenue starting with letter B, web service will return all data address starting with B, in all over Brazil, this is really big result. My database has more than 200 megabytes. Actually, this database contain more than 900 thousands records, 45,738 districts and 10,698 places.
My mormot_excel.xls sheet accesses the web service and displays the data provided by the webservice. Clicking on the clear button clears the data from the Excel sheet).
The REST HTTP version is both simpler and more portable, you can create this with Android platform and demands less code on the server side as well. Why wouldn't you use REST rather than SOAP throughout your work? If you control both ends of the transaction, this is a very appealing option, as it lets you use whatever web tools you like, not just tools specifically oriented toward SOAP web services. However, there are many services that are available only through SOAP, and a growing number of programmers who know how to work with SOAP. It's best to have both approaches in your toolbox. Now our little mORMot supports authentication using Delphi, javascript, java-android and visual basic for applications. This is very nice, isn’t it?
Tags: Remote service with Excel; webservice with Excel; CEP with Excel.
Assinar:
Postagens (Atom)