Great new AVFP site

Topics: Developer Forum, Project Management Forum, User Forum
Sep 11, 2013 at 11:31 AM

Impressive! Looks like the whole site was done with AVFP.
Oct 24, 2013 at 9:20 PM
Hi Claudefox , thanks for mentioning this site, indeed was entirely developed by me in AVFP , (plus some routines in Javascript) , unfortunately my clients have asked me to migrate the system to wordpress because it can easily theming and has the option of working with a content management system , ( something that is missing in AVFP ), although I disagree with this decision, I have no more to obey , ... but the lesson is learned, so now working on building a small AVFP content administrator for this to not happen again , my commitment is to AVFP WEB development as befits a fan developer of Visual FoxPro applications .
            Thank for AVFP, the possibility to build web sites entirely handled by Visual foxpro code was something I was wishing and hoping for many years , I take also to offer my help ( implementation, development ) , for Spanish speakers interested in AVFP .

from Chile, Southamerica

---- español ----
       Hola Claudefox, gracias por mencionar este sitio, efectivamente fue enteramente desarrollado por mi persona en AVFP, (ademas de algunas rutinas en  Javascript), lamentablemente mis clientes me han pedido que migre el sistema a Wordpress debido a que se puede tematizar fácilmente y posee la opción de trabajar con un sistema de administración de contenidos, (algo que le hace falta a AVFP), aunque no estoy de acuerdo con esta decisión no me queda mas que obedecer, pero la lección esta aprendida, ... así que ahora trabajo en la construcción de un pequeño administrador de contenidos en AVFP para que esto no vuelva  a pasar, mi compromiso de desarrollo WEB es con AVFP como corresponde a un fanático desarrollador de aplicaciones de Visual Foxpro.
        Gracias por AVFP, la posibilidad de construir sitios web enteramente manejados por código Visual foxpro era algo estuve deseando y esperando durante muchos años, aprovecho también de ofrecer mi ayuda (implementación, desarrollo), para los hablantes hispanos interesados en AVFP.

desde Chile, Sudamerica
Oct 24, 2013 at 9:43 PM
so now working on building a small AVFP content administrator for this to not happen again , my commitment is to AVFP WEB development as befits a fan developer of Visual FoxPro applications .
Absolutely great! I think VFP is a great tool for Web Content Management. I'm working in both WordPress and DNN right now and there is nothing in either that can't be done as good or better in VFP using AVFP.

Please keep us apprised of your progress in this avfp CMS!! I'll gladly include it in the next version of AVFP if you want.

---- español ----
Absolutamente genial! Creo que VFP es una gran herramienta para la gestión de contenido Web. Estoy trabajando tanto en WordPress y DNN ahora y no hay nada en que no se puede hacer igual de buenas o mejores en VFP utilizando AVFP. Rogamos que nos mantengan informados de su progreso en este avfp CMS!! Con mucho gusto voy a incluirlo en la próxima versión de AVFP si lo desea.
Oct 25, 2013 at 1:27 AM
... really thank you for this invitation to colaborate, ... work slowly in this CMS, since my calendar (thanks god!) is overloaded right now, ... yet this invitation motivates me to find extra time (my wife will not be happy), ... if you have patience I will be happy to contribute to this magnificent project.

---- español ----

... realmente gracias por esta invitación a colaborar, ... trabajo lentamente este CMS, ya que mi calendario (gracias Dios!) está sobrecargado en este momento, ... sin embargo, esta invitación me motiva a encontrar tiempo extra (mi esposa no va a estar feliz), ... si tienes paciencia estaré encantado de contribuir a este magnífico proyecto.
Oct 26, 2013 at 9:34 AM
Just giving a little thought to this:

For content editing, I've seen tinymce used a lot in web apps. And there are probably other free and open source ones too we could use for the content editing portion. But I've seen tinymce used specifically in Foxpro web apps.
Oct 28, 2013 at 4:38 PM
tinymce is a excellent javascript editor, ... is there any particular reason why it is busy in Foxpro web App's ?

... had also reviewed the following alternatives also are Heavyweights editors ...
CKEditor (next generation of FCKeditor)
YUI Rich Text Editor - of yahoo
Oct 28, 2013 at 5:38 PM
I've seen tinymce in a foxpro web forum application so I know it can work with VFP. I could probably provide some source for an example of using it in VFP.

But that's the only reason - just because it has worked in VFP. The others you listed might actually be better.

One key thing in your CMS is how to deal with themes/skins. I like WordPress's way of working with themes and I'm learning DNN skins. The WordPress way seems like it would be easier to implement in AVFP.
Oct 28, 2013 at 8:17 PM
I agree that the way in which it handles the theming, is the most delicate part of CMS, because of the implications that will have to add more pages or modify the contents of the existent, ... I'm not quite sure how wordpress handles the theming, but in on a very basic description (correct me please if I'm wrong), apparently wordpress creates a folder for each theme in ... \ wp-content \ themes \, with all the pages that are affected to theming and in a configuration file (functions.php usually) is written the reference to the current theme folder and then the requested page is load from this folder, ... then the content is filled from the database.

For DNN you refer to DotNetNuke Framework for ASP.Net or another soft (for theming maybe) ?
Oct 28, 2013 at 9:07 PM
Yes, WordPress has a hierarchy of DEFAULT pages that it will use. The Theme (which is in its own folder) takes the place of these default pages. I'm wondering if we can use VFP instead of PHP, as used in WordPress, to accomplish some of this.

Yes, DNN is short for DotNetNuke. The process of creating a "Skin" (the equivalent to a wordpress theme) is a lot different than how it's done in WordPress. I'm in the middle of implementing a site now and I'm not sure how I feel about it yet...

Maybe we should establish a minimum set of requirements for this new AVFP CMS. Such as:

1.) Ability to create content interactively (using something like tinymce) that is stored in a table.
2.) Ability to use themes\skins that can be switched easily to change the look and feel
3.) Plug-in api for new FoxPro modules

etc. for some simple goals
Oct 28, 2013 at 10:16 PM
... I agree with the basic requirements, are the key concepts of a CMS.

               Claude this my mail: for exchange documents, ... in fact, would appreciate if you could send (if you wish) an overview of the functionality of the API (besides the obvious) and one idea over the modules that could be implemented.
Nov 1, 2013 at 3:32 PM
I would just use your experience with WordPress to do something similar - content in DBFs, pluggable CSS themes, VFP program plugin architecture. Start as simple as you want. the end result will more than likely be easier than WordPress or DNN since most things are already built-in to VFP.

I would prefer to use AVFP MVC with extensionless URLs but since you're doing most of it, it's up to you.
Nov 3, 2013 at 3:24 PM
Claude, good news, the programmer Victor Espina contact with me, (he is the responsible of the avfp resthelper module), and proved to be a fellow, living in a nearby city in my country, we will gather to discuss the issue CMS, we will review the alternative of avfp model-view-controller instead the wordpress scheme.
Nov 3, 2013 at 3:51 PM
Wow - that is really fantastic news!!
Nov 6, 2013 at 2:51 PM
Hi Crizu/Victor,

It would nice if we can have HTML encoding of output inbuilt in mergescript(). Currently I use oServer.HtmlEncode() in <%= %>.
If we could have another tag like <%: %>,just like, which does this encoding, it would be just great.
Nov 6, 2013 at 11:29 PM
Claudefox, I think maybe a good approach here could take the best of both worlds:

a) We can store themes in separate folders inside a Theme folder. Each subfolder would contain specific file that creates the theme's UI. Each element on the theme would follow a pre-definied element name convention.

b) We can use MVC to handle the content requests, using an delegate pattern to handle the view part. This delegate would be a subclass of an abstract "theme" class, defined in the current theme.

c) We can create a REST controller to handle CMS crud operations. Then, create an HTML UI using JavaScript + AVFP + AJAX calls to manage the CMS content.

What do you think?

Victor Espina
Nov 6, 2013 at 11:30 PM
Titu1 wrote:

This sounds like a feature request for AVFP 6.04 :)
Hi Crizu/Victor,

It would nice if we can have HTML encoding of output inbuilt in mergescript(). Currently I use oServer.HtmlEncode() in <%= %>.
If we could have another tag like <%: %>,just like, which does this encoding, it would be just great.
Nov 7, 2013 at 2:09 PM
Hi, Titu1

It's a very interesting proposal, I have understood that the use of the etiqutas <%: and%> is a new feature of ASP 4, this allow that all the output Html code is automatically encoded, correct me if I'm wrong but to implement those tags in AVFP I think it would be necessary to modify the library activevfp.dll, to support this specific feature (and others perhaps) of this version of ASP. That way avfp would understand that "<%: modelo.contenido"%> means <%= oServer.HtmlEncode (modelo.contenido)%> "... is very clear and better.
Nov 7, 2013 at 3:01 PM
Edited Nov 7, 2013 at 3:03 PM
Hello Victor and Crizu,

What you propose sounds good.

I would really initially just like to see a page that lets us switch between a list of Themes (skins), for an entire site, by simply selecting it. Take a look at the WordPress Theme Administration page for any site:
http://<wordpress site>/wp-admin/themes.php

Next we should develop plugin functionality so that a vfp web shopping cart can simply be dropped into the site and automatically use the theme that was previously selected.
Nov 7, 2013 at 3:39 PM
Interesting. I think this can be accomplished by a mix of templates with dynamic sections and CSS. In my mind, a Theme has to have some predefined "master pages" with placeholders where AVFP can inject dynamic content, and a master CSS that define the appearence of basic UI elements like text, tables, buttons, form elements, lists, etc... something like Twitter's Bootstrap, but a lot less complex.

A interesting challenge indeed.
Nov 7, 2013 at 4:09 PM
Edited Nov 9, 2013 at 4:32 AM
Hi crizu,
Yes, thanks , that is what I meant.
I was little concerned that I may be left behind for CMS upgrade if this was not considered. But then.. I may be getting paranoid little too early.

See here, this is our local web site, where we can hack the page from both client and server side. framework 4 provides protection only from client side. Therefore, cms content may have to continue to provide server side protection.
Nov 13, 2013 at 2:15 PM
I'm working in both WordPress and DotNetNuke full-time now so I'm available to answer questions on how they do things and how we can do things on this new AVFP CMS.
Nov 14, 2013 at 1:43 PM
Hi Claude .

         Great, one hand is always welcome , especially in a major issue such as CMS ,

... I've been talking to Victor and we agreed on the following line of development :

a) Using CSS, the theme must define the visual style of all pages of the site.

b) Any theme should involve several predesigned templates , whose only function is to define a specific layout : header, one column , two columns, etc. .

c ) Each of these templates would be composed of basic HTML to load the CSS issue and define the basic layout using DIVs , using placeholders to mark the spot where you inject the content .

d ) When you create a page on the site, you should be able to specify the template to be applied and would go CMS content associated with each placeholder template.

e) The user should be able to create your own templates from a template defined base on the issue would have only load the CSS , so you may create your own template and that inherits the visual characteristics of the subject this asset .

        ... as Victor says , would have to begin by developing a complete set of templates and then go from there .

On the other hand I'm mulling over the idea of ​​leaving the templates out and manage everything with CSS only, ( generic CSS building for the various placeholders and combining them according to an analysis of the layout of the page ) , that would give extraordinary power to the theming of AVFP ... but I think it is difficult to implement something like that, I think I will do some proof of concept , if I find you I will know.
Nov 14, 2013 at 4:43 PM
I think that a template system is the way to go, but let's wait for Christian 's probe of concept to see what can be done using just CSS.
Nov 14, 2013 at 5:09 PM
Thanks - you guys seem to be on the right track!
Nov 19, 2013 at 12:48 PM
Christian and I finally met this last sunday. A great meeting if I can say. We agree in separate this effort in three different modules:

a) A CMS module. Based on MySQL and a RESTfull service, this module will allow to create, update and access articules in a content database, using a RESTfull service as a data layer, specially to retrieve content from the database.

b) A Theming module, using pure CSS.

c) A Template module, that works transparently with the previous modules

The main idea is that these modules can work as plugins; if you need them, you download all or any of them, unzip them and copy into a special plugins folder inside an AVFP site. To make this possible, I will reload an old project I was working on to implement a new request processor for AVFP (that would coexists with the actual MAIN.PRG), that support cascaded dynamic processors. The default "processor" would be a version of the current MAIN.PRG loader, but we will be able to "install" or "register" other external processors that can be fired after or before the default processor. Working this way, the RESTfull.prg would be a processor that would be fired before the default processor in order to handle REST requests. If a processor is not able to handle an specific request, it will pass it to the next processor in the cascade until the default processor is reached and ONLY then the resulting HTML will be returned.

What do you think?
Nov 20, 2013 at 12:20 AM
It all looks good. However, I'd like to see it use native DBFs instead (or in addition) to MySQL. A built-in database is part of what makes VFP unique and would make this CMS about 10x easier to install for first time users.
Nov 20, 2013 at 11:37 AM
The problem with native DBF in a CMS context is that we will be forced to use MEMO fields to store the article's content, wich in my experience tend to get corrupted very easily. But I get your point. DBF will be a lot easier for test-learning porpouses and for production you can always use MySQL. We will be forced to use a "delegate pattern" or a "Driver approach" to get both options without duplicating code.
Nov 20, 2013 at 3:47 PM
... a solution to this dilemma is to avoid as much as possible the use of memo fields for example by storing the "content memo" in files on disk and saved in dbf tables only physical addresses of these files, it is not a graceful exit but is safe or whatever another handler.

             In my humble opinon, if AVFP wants to become a serious development alternative should not ignore solid engines like MySQL or Postgres, ... is more, I think that should be aimed at them .... is known that the FTP files are definitely unstable and the tables in database not include security natively. ... VFP's detractors always point to this (these) Achilles heel.
Nov 20, 2013 at 5:29 PM
Edited Nov 20, 2013 at 5:30 PM
Both would be nice (just like with the standard AVFP demo although that is not nearly as challenging as a CMS)

I just go on my experience which is - it's very nice, when you install something, if you don't have to install 3 different things from different providers just to install a demo. I think ease of use is a must-have for AVFP and will be one of the best points about it (not a programmer's CMS ! (unless vfp add-in modules are being written like shopping carts,etc)) and DBFs are definitely easier to install (no installation!) and manage. But I get your point about stability.

You could also think of MEMO fields as another advantage for VFP, I think. Aside from stability issues, that is. FWIW, I've never seen tables containing MEMO fields fail. The biggest problem I've seen was MEMO bloat (which isn't that big a deal..).