Blog: Xojo Web Framework 2.0?

The Xojo XDC conference in April in Denver (to which I will be speaking) has a presentation from Xojo, Inc. on a new web framework.

I share some thoughts, concerns, and pointers for what I would like to see from Xojo Web in the future.

5 minute read.

http://www.dev.1701software.com/blog/2017/11/30/xojo-web-framework-20

Xojo Web:

  1. Create new xojo web project
  2. Drag button to WebPage1
  3. In Button1.Action, type MsgBox "testing"
  4. Run the app

Others:

  1. Create index.html file with notepad
  2. Type <input type="button" onclick="alert('testing')">Untitled</button>
  3. Open the file in a browser.

:slight_smile:

[quote=362497:@Asis Patisahusiwa]Create index.html file with notepad
Type Untitled
Open the file in a browser.[/quote]

And now try to display a modal or connect a database :wink:

That’s why we need a framework :wink:

[quote=362480:@Phillip Zedalis]Instead of breaking your current paradigm of fixed location widgets in favor of responsive design; How about presenting three views similar to how you do it with iOS.

A smart phone view, tablet view, and desktop view. You would drag widgets to each applicable view depending on whether they should appear and how they would appear. They would share a name across all views so your backend code is not concerned with the size.[/quote]
This would be a vast update, which I would really appriciate!!! And it would solve most responsive issues. Its actially the same way we design our responsive layouts today (just with one object and three views and not three objects in one view).

Today we don’t use the Xojo webstyles anymore for like they are designed. We mostly set up our own CSS.


I would append your list of wishable improvements:

  • Please add a CSS-Editor for entering own CSS. Today we need to load external sources or use the HTML-Header-Property which can get messy very quick
  • Please add a possibility to add Stylesheets and JS-Scripts over the IDE. So we don’t have to use HTML-Header Property as well and can maintain the scripts easier.
  • The responsive designtime-API suggestion of Phillip would be awesome
  • Add a possibility to design and structure a webproject only by code, for example by using floating layouts. Draging and Droping controls on a webpage, which needs to be extremly more flexible as a desktop-app is to old-fashioned and it would push the web platform further for really good web devs.
  • PLEASE allow to add more than one Webstyle (=CSS-Class) to a webcontrol. This would increase the styling-possibilities enormous.

My Wishes for new or improved controls:

  • sortable, filterable Listboxes
  • date control
  • more extensive popumenus like bootstrap select2
  • webtexteditor like mceEditor oder CKEditor for producing valid HTML

My important wish is multi-line strings, so that we would have something along this:

[code]Dim html As String = “”"

one two three
"""

Return html[/code]
instead of this:

[code]Dim html As String = _
“<div id=”"" + ControlID + “”">" + _
" <input id=""" + ControlID + “_input”" type="“text”" />" + _
" <select id=""" + ControlID + “_select”">" + _
" one" + _
" two" + _
" three" + _
" " + _
“”

Return html[/code]
The {{ }} as concatenation operator for a string within a multiline string is just an idea. In the end, if done well, it doesn’t matter how it’s done – we just need multiline strings in Xojo in general.

I use the Web edition the most and it seriously needs a bit of upgrade.

Initially, it was and probably still is marketed as being quicker than other scripting languages because it is compiled to binary but in actual fact, I’m sure PHP is quicker and uses fewer resources due to the way you interact with the browser.

The Style editor looks nice but it is not very intuitive and very very very slow to work in. Would be nice if we could have a code view to sort and copy the order of certain elements. I would also like to be able to declare CSS styles at runtime.

I agree with Lars about having an updated Listbox with filter and header sort and maybe even a true Combobox.

[quote=362508:@Lars Lehmann]

  • PLEASE allow to add more than one Webstyle (=CSS-Class) to a webcontrol. This would increase the styling-possibilities enormous.[/quote]

Lars have you tried subclassing the Styles and jus re-assign them at runtime as you need it?

Example Right click on Style->Subclass

At runtime, you would the just select the appropriate class:

Dim n As Integer

for n = startVal to endVal
  
  if n <= currentValue then
    ccLEDBar(n-1).RectangleLED.Style = StyleLED_RECTANGLE_GREEN_ON
  else
    ccLEDBar(n-1).RectangleLED.Style = StyleLED_RECTANGLE_GREEN_OFF
  end if
  
next

WebCanvas also needs a bit of an upgrade with regards to features. I recently started playing with the webcanvas. I Find it to be very buggy and in need of some more drawing controls. Would be good if we could interact with the canvas on the browser end to make things appear a little bit more interactive like dragging virtual objects on the canvas. Presently everything is processed on the serverside and pushed back to the browser. Currently we have to still make use of additional technologies ie. D3.js or Processing.js etc. This defeats the purpose of marketing statement that we only have to learn one language. I Still have to learn all the other languages and javascripts frameworks to get things done.

[quote=362515:@Rudolph Thomas]At runtime, you would the just select the appropriate class:

[/quote]
this more a workaround than a good solution. Sure it works, but using multiple classes, which can sum up and be nested are a real strength of CSS-driven layouts, which should be supported.

You have my vote bud!

Oh god! Yes!!! Writing HTML or JS (strings) in Xojo is horrible today!

Writing in the source code a multiline string constant , i.e. something that is defined before the source is compiled, is not practical at all.

Define a string constant instead: you can have any contents and you get also an easier editor if you need to change its value.

[quote=362520:@Maurizio Rossi]Writing in the source code a multiline string constant , i.e. something that is defined before the source is compiled, is not practical at all.

Define a string constant instead: you can have any contents and you get also an easier editor if you need to change its value.[/quote]
It’s not ease writing this though, because there’s no editor, just a plain textbox. HTML-Tags aren’t nested, not highlighted and so on.

[quote=362511:@Eli Ott]
The {{ }} as concatenation operator for a string within a multiline string is just an idea. In the end, if done well, it doesn’t matter how it’s done – we just need multiline strings in Xojo in general.[/quote]

I Agree with you on this idea. Like @Maurizio Rossi suggest using constants. I Agree. But having a small little teeny wheeney box on the right-hand side to review your code is silly. I know you can just press […] button to enlarge and view your code but we have this nice piece of real estate sitting smack bang in the middle of the screen. Why not display it there? instead of having to get stuck with a modal edit box.


https://drive.google.com/file/d/10baDNRPFg-TsT4Hdh6ny5Q-35yNcdX4_/view?usp=sharing

If Xojo are announcing something new within days, it’s probably way to late to be assembling a wish list now; or you are discussing Web Framework 3.0?
Hopefully someone raised these as suggestions last year…

Sorry Lars,
Xojo Web was not meant to be used by Web pros.

This was repeated many times by Xojo’s team developers.
An example of this is my feature request to implement a more advanced CSS editor: the reply was that Xojo web must be simple enogh to be used by users with little or no knowledge about web technologies.
If you need something more you can use WebSDK, implement yoursef CSS styles and so on.

I hope Xojo will listen also more advanced users.

The real problem is that web projects are not on par with desktop projects.
So you lose webcontrols with similar functionality, syntax highlighting for html tag and css styles, websockets and many other useful things for developing web oriented applications.

Xojo web is, in my opinion, a great product.
You can do many things in a way similar to a desktop application.
The only problem is that Xojo is a very small company and this has some conseguencies.
Right now Xojo has many other things scheduled and some of them are taking way more time than expected.
So a new or improved web framework will be available in an undetermined point in the future and its contents, maybe, will be partially announced next year at XDC.

I’m hoping in some “big” improvement but, like you, I’m waiting.

[quote=362525:@Jeff Tullin]If Xojo are announcing something new within days, it’s probably way to late to be assembling a wish list now; or you are discussing Web Framework 3.0?
Hopefully someone raised these as suggestions last year…[/quote]

Jeff there is always room to grow. A Wishlist is always important to plan a roadmap no matter where you are. So lets see what we get and make it better.