El jue, 13-05-2010 a las 17:38 -0300, Marcos Douglas escribió: > FPC + ExtJS > This is the configuration I want to do. In the ExtPascal list, there > are some people using the same approach. > But I continue with doubts about how to use separate *.js files. How > you do that? Do you open *.js files in app, replace some tags/macros > and sends to client?
Hi Marcos, .js files are opened by the web browser, not by your app. Inside the .js files are AJAX calls to the application also residing on the web server. The app could be an simple CGI or a WebServer itself, just like ExtPascal. I have to point that the application doesn't have to know anything about HTML nor Javascript, it just receive and answer JSON data, that is parsed by the web browser. Going a little further, what the FPC program does is very little, just answers with JSON to the ExtJs program running on the web browser. The simpliest example a can do is the one I published here: http://leonardorame.blogspot.com/2010/02/web-20-programming-with-object-pascal.html In the example I didn't use an FPC program, just setted up an Apache Server containing an HTML file, the ExtJs package and a .Js file with a grid. When the browser points to the server, the files are loaded, processed and it asks for JSON data, also in a file inside the web browser. I hope I clarified some concepts. -- Leonardo M. Ramé Griensu S.A. - Medical IT Córdoba Tel.: 0351-4247979 -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
