Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FoxLANWeb : the magic fox lives on both LAN and Web!
Message
From
03/11/2010 06:38:59
 
 
To
02/11/2010 11:20:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01466562
Message ID:
01487938
Views:
153
> From what I understood, not only that but you need to learn and code JavaScript:) And then you also need to learn SQL and HTML,CSS... Hmm Silverlight, Linq, EF ... sound to be easier each day:)

Hi Metin and all,

Thanks for your comments about FoxInCloud
I'll try to detail some of the skill issues you raised about FoxInCloud

HTML / CSS
FoxInCloud renders your forms in HTML / CSS based on your classes and containment hierarchy ;
You need to work on HTML and CSS ONLY if you want to override this 'standard', VFP-like look and feel.

For exemple, if you have
Combobox - cboBase - cboCustom - form.cnt.cboInstance
cboInstance will be rendered as
<select class="Combobox cboBase cboCustom" id="form-cnt-cboInstance "... >...</select>
generated CSS will define custom properties at each level of class :
awDefault.css
.Combobox {font:...;width:...; etc.}
.cboBase {width:...; } /* width is custom in your VFP cboBase class*/
.cboCustom {font:...} /* font is custom in your VFP cboCustom class*/
You may override at any level to improve HTML look and feel; for instance:
myApp.css
.cboCustom {font:...} /* any combo based on cboCustom inherits this setting */
This principle is demo'ed here : http://www.foxincloud.com/demos.php. Clicking the 'change to web 2.0 style' just pulls in an additional CSS file which overrides generated CSS. You may inspect the 'standard' and custom CSS.

Javascript
Javascript is very much fun to learn and work with, not only because it is very close to VFP (and far more object oriented and powerful), but also because you can find a whole bunch of free resource on line, among which frameworks which make work much easier. We at foxInCloud learned a lot in software engineering just by reading and understanding javascript framework source code.

In FoxInCloud context, you will need javascript in 2 situations :
1- to implement 'surface' events such as mouseMove, mouseEnter, etc. as it would make no sense to send them to the server for execution
2- to implement activeX besides those FoxInCloud will support (http://www.foxincloud.com/roadmap.html)

'Surface' events are usually very simple, such as show/hide and element, swap an image, etc.
Again you can see a demo of this principle here : http://www.foxincloud.com/demos.php.
Clicking the fox head swaps 2 images ; this event feature existed in original VFP application, we decided to defer it to the client, just by writing this code in image's .click() event :
procedure click()

* If HTML is being generated
IF thisForm.wlHTMLGen && each form inherits .wlHTMLGen from FoxInCloud base classes

	&& THIS ILLUSTRATES HOW AN EVENT IS PROCESSED ON CLIENT SIDE

	&& RETURN .F. : ignore event
	&& RETURN .T. : send event to server [default]
	&& RETURN javascript code : process event on client side
	
	RETURN [this.src = 'images/' + ((this.src.substr(this.src.lastIndexOf('/')+1).toLowerCase() === 'vfp9logo.png') ?];
		 + ['foxincloud-logo-head-32.png' : 'vfp9Logo.png');] && javascript code

ELSE && Event occurred in LAN mode

	this.Picture = Addbs(JustPath(m.this.Picture));
		+ Iif(Lower(JustStem(m.this.Picture)) == 'vfp9logo';
				, 'foxincloud-logo-head-32.png';
				, 'vfp9Logo.png';
			)
ENDIF
Please note that you write the same logic in a single place, once in javascript, once in VFP, without any other dependency.
If ever you need to change, say a picture file name, search and replace takes place in the same code snippet.

SQL
FoxInCloud just executes your application's events and compares visual state before and after event.
It executes no more SQL than what you have in your application, exactly in the same fashion.
IOW, you need no additional SQL coding for FoxInCloud to operate.

HTML 4/5
I'm afraid the recent announcements about HTML5 specs induced a lot of useless confusion, though I believe intentional disinformation.
The only controversial point of these specs is about video codecs as a standard war underlies to capture the on-line advertisement market.
As far as 'RIA' are concerned, HTML4 is largely sufficient to address 99% of RIA needs.
The only 'interesting' HTML 5 new native features are rounded shapes, rotations and drop shadows, which are already implemented in current browsers, though with varying syntax:
For instance, to obtain a rounded shape, you need to write in your CSS:
-moz-border-radius:8px; /* for firefox*/
-webkit-border-radius:8px; /* for safari */
-o-border-radius:8px; /* for opera */
etc.
The good news is that the CSS parser just ignores instructions he does not understand, so you need very few IF ... ENDIF

Believe me or not, writing HTML/CSS for all browsers is fun.

Silverlight vs HTML/CSS/JS
As mentioned earlier, HTML4, CSS2, JS 1.5, all dating back from 10 years ago, do most of what you may obtain with Silverlight.
Il you consider implementing HTML5, CSS3 new features with browser variations, you obtain a very competitive, if not equivalent User Interface.
Everyone knows Silverlight is proprietary, has less than 5% market share and would not survive against flash/flex if m$ was to take over Adobe as rumored 3 weeks ago.
Seeing Silverlight supported once on Apple and Google mobile platforms is very unlikely, just for the on-line advertising issue I mentioned earlier.
And personally, I prefer HTML/CSS standard and open syntax rather than seeing a bunch of unreadable XAML files spreaded around.

I hope these few lines may help.
FoxInCloud FAQ covers many of these points : http://www.foxincloud.com/faq.php
Thierry Nivelet
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform