Jump to content
Sign in to follow this  
Mason Wheeler

Server-side scripting support?

Recommended Posts

Everything I've seen in Smart so far is basically about creating static pages with a lot of fancy client-side effects, by translating Object Pascal to JavaScript with DWS's JavaScript codegen.

 

But the primary use case of DWS is as a server-side scripting system, and that's something I don't think I've seen any discussion of on here. Is there any support (current or planned) in Smart for stuff like the example Eric demonstrated here, with server-side scripting mixed into the page?

 

Right now there's no editor that can handle that, because no existing product understands DWS's templating syntax, so pages have to be basically written by hand. That's what I was hoping Smart would be, more than anything else.

Share this post


Link to post
Share on other sites

Server side was never part of the plan for this initial release. Neither was general web development. Our main goal with this product was to create a RAD development tool for standalone HTML5 based solutions, targeting mobile devices. I.e. with no need for a server - not even an Internet connection...

 

We do have, of course, server side support on one of our internal roadmaps - but we haven't made any decision yet.

 

 

 

 

Share this post


Link to post
Share on other sites

I have been creating web apps for a while where I use html+javascript to create the client and then I use delphi to create either a cgi or isapi dll for the server.

 

I use two techniques:

 

1. The html page has a form that when submitted, calls the CGI. The CGI grabs an HTML template from the server (an html page that has replaceable tokens). The CGI accesses the database and/or does whatever it needs to do and then replaces the tokens in that template and sends the resulting HTML back.

 

2. The html page does an ajax call and then the CGI just has to return a relatively small bit of html to populate the element and in most cases that doesn't require loading and filling an html template from the server.

 

 

One of the main reasons I am interested in SMS is because basically I can now use object pascal in both environments. In the past I just used dreamweaver and EditPlus for creating the HTML and CSS.

 

I think that using Delphi to create a CGI or ISAPI DLL is perhaps pretty close to having a unified client/server solution. The only downside is that it requires Windows server - but I suppose that might be overcome (if desired) by using Lazarus.

Share this post


Link to post
Share on other sites

The approach you describe is exactly what we are doing, except we use RemObjects on the server. This allows us to call our "core" from both native client apps, web pages and mobile.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×