Web Connection
iis and program is to large issue
Gravatar is a globally recognized avatar based on your email address. iis and program is to large issue
  CJBEdexis
  All
  Jul 25, 2018 @ 09:29am

we have built some data management objects that have now caused "program is to large" errors in an application using activevfp and iis. does westwinds have a solution or a fix for this problem, if so we'll just replace the activevfp with your product and move on. we do use westwinds and other projects but in the desktop environment and looking to upgrade to the lastest version in all our apps.

thanks

Gravatar is a globally recognized avatar based on your email address. re: iis and program is to large issue
  Rick Strahl
  CJBEdexis
  Jul 29, 2018 @ 12:47pm

I think that all depends on how your application is structured. FoxPro has a single file 64kb compiled size limit and if you exceed that there's really nothing you can do to get around it, except break up your code. I don't know much about ActiveVFP, but if I recall it uses scripting page templates, which means you're generating code from the HTML + your code which can easily get very large.

Web Connection will have those same 64kb max compiled file size limits, although WWWC tends to encourage you to break out code into separated components rather than trying to write everything inside of script pages. In fact, we encourage not writing any code in scripts and deferring the model creation code in the controller classes which in turn can and should defer to business logic that is handled in business objects. Those are suggestions of course - you can write your code any way you want, but that's the recommendation.

One of the advantages is that you can write a lot of your code logic inside of controller code, or separated out business objects and then access the model (or business objects) in the page templates.

I think in ActiveVFP part of the problem is that you end up with very large script templates that contain everything in a single file. With Web Connection a lot of your code can live outside of templates and if you have very large pages you can break them out into Partials that can be combined to render a full page. So for scripting pages with Web Connection you should never have to hit the 64kb limit or if you do you start splitting the content up into partials.

Here's more info on Layout, Partials and Sections:

You can also split up the controller classes into multiple separate logical controllers again something that is encouraged in Web Connection and can be easily achieved. Each controller should be focused on specific module functionality.

IOW, there are lots of options to break up code and script to avoid the 64kb limit.

+++ Rick ---

© 1996-2024