Transitioning to Web Programming

Status
Not open for further replies.

Feanor727

Smack-Fu Master, in training
83
Subscriptor++
Hello all. I'm hoping to tap the hivemind for some recommendations on learning resources that will help me get up to speed in "modern" web programming techniques, specifically UI integration stuff. I've found a lot of "Intro to JQuery" and "Learn design and layout HTML/CSS" sites, and they're great and helpful, but not quite what I'm looking for. Some background: I've been programming professionally for about 8 years now, mostly (65%) on back-end/business logic concerns. I've written a number of user-facing apps, but always within the context of either Windows Forms/WPF apps, or (most recently) an ugly, 3 year flirtation with Adobe/Apache's Flex platform. My team is currently in the process of transitioning our Flex application to the Typesafe Stack/Play Framework. So far, so good -- Scala has been absolute joy to work with, but the problem I'm running up against is that my front-end pages are very... static. I've been reading the docs and going over the sample applications with a fine-toothed comb, but they all seem to assume a familiarity with modern, dynamic web programming techniques (things like Comet, WebSockets, AJAX, etc). Do any of you all know of a good resource to help "transition" a traditional developer into the modern web world? Like I said before, I've done the "Intro to HTML", "Get started with JQuery in 4.5 easy steps" thing. I've been running through Javascript exercises on sites like CodeWars. I'm aware of RESTful API design. Our proof-of-concept app is functional, and looks ok -- I'm looking for resources that will help me bridge the gap from "I'm browsing a web site" to "I'm using a web app" without having to read 2000 words on the difference between a div and a span tag, or what a CSS class is.
 
JQuery is fine for up to a hundred or so lines of code but does next to nothing to help you organize, re-use, and extend, test, and build (minifiy, aggregate, execute unit tests) code. If you want to build a robust web app with significant amounts of client-side code, I'd recommend first looking at JavaScript - The Good Parts, and Effective Javascript. After you're familiar with the basics there are a number of excellent JS libraries that are far better than jQuery. I'd say that what you're missing are some pieces that let you apply your existing knowledge of programming techniques to a web application. There are a couple of "kitchen sink" frameworks that have a lot of the bits and pieces to build a web app; Dojo (free), and ExtJS (not free). Or you can roll your own by starting with RequireJS to organize and load modules and use specialized libraries that try to do one thing well. JQuery is not web app development, mostly its used the same way as WordPress etc. to allow the unskilled to copy-paste things off the internet until it sort of kind of works.

Personally I'm biased towards Dojo, it has an extendable, template-based widget system that makes creating re-usable components extremely easy. Take a look at http://dojotoolkit.org/documentation/ (especially the article 'Creating Template-based Widgets').
 
D

Deleted member 43669

Guest
Meh, JS "web apps" are overrated and in many cases, inappropriate.

However, if you feel you truly need one, I'd jump into one of the frameworks designed for that. AngularJS would be my safe choice nowadays. GWT, Dart or something like that (e.g. something that lets you *not* write Javascript) would be my wild bet.
 
[url=http:/civis/viewtopic.php?p=26779767#p26779767:3viakihi said:
koala[/url]":3viakihi]Meh, JS "web apps" are overrated and in many cases, inappropriate.

However, if you feel you truly need one, I'd jump into one of the frameworks designed for that. AngularJS would be my safe choice nowadays. GWT, Dart or something like that (e.g. something that lets you *not* write Javascript) would be my wild bet.

Angular is great for small-medium projects but doesn't help code organization at all. Cross-compilation just adds yet another layer of abstraction on top of something that doesn't work as well as you'd like in the first place, its better just to bite the bullet and learn the environment.
 
I don't understand what you're asking for. What's the difference between a web app and a web site, to you? Also, why do you think you're going to get away with writing web apps without learning the difference between a span and a div, or what a CSS class is? Or - are you saying that you already know these things?

Edit:

Are you asking for:

1. More details on how information goes across the wire?
2. What are the separate concerns of a webapp?
3. What are some good ways of creating responsive web GUIs?
 

Skratti

Seniorius Lurkius
1
I had big difficulties to get into Javascript (my background is C++, C#, C/AL, X++).

The breakthrough was to read, and do some examples, out of the very short book
"Making Isometric Social Real Time Games with HTML5 CSS3 and JavaScript"
There is a pdf of it in the internet, but I would suggest to buy the book.

Additionally to some graphics stuff, the book explains some of the javascript specialities (prototypes instead of classes).
Just in case that such a theme is interesting to you.

The book is focused on creating a web app - meaning in this case that the website is only loaded once and all subsequent interactions are submitted via ajax.
 

wb

Ars Legatus Legionis
25,208
Subscriptor
[url=http:/civis/viewtopic.php?p=26786623#p26786623:6arxcmfd said:
Ravensroke[/url]":6arxcmfd]
Angular is great for small-medium projects but doesn't help code organization at all.

This seems like kind of a strange criticism of a javascript framework. Do you complain about a lack of code organization in frameworks for other languages like Entity Framework for C#/.NET?

I don't mind code organization provided for me in starter projects, or examples, or default settings, etc. but I do mind when they are built into the framework itself. Sometimes those structures just don't fit the project you're working on. If those things are baked into the framework, it actually becomes a pain in the ass to work around it.

Or, maybe you are saying that it "doesn't help code organization" for some other reason which I fail to comprehend. Like, it doesn't provide an adequate level of abstraction between layers, or something.



Regarding the OP, it's hard to gauge what kind of information you're really looking for. A "web app" is a bunch of pieces that all work together, and from your comments it feels like you are missing one of more of those pieces, but it's hard to tell which pieces you are missing.
 
[url=http:/civis/viewtopic.php?p=26798761#p26798761:apcfuc86 said:
wb[/url]":apcfuc86]
[url=http:/civis/viewtopic.php?p=26786623#p26786623:apcfuc86 said:
Ravensroke[/url]":apcfuc86]
Angular is great for small-medium projects but doesn't help code organization at all.

This seems like kind of a strange criticism of a javascript framework. Do you complain about a lack of code organization in frameworks for other languages like Entity Framework for C#/.NET?

I don't mind code organization provided for me in starter projects, or examples, or default settings, etc. but I do mind when they are built into the framework itself. Sometimes those structures just don't fit the project you're working on. If those things are baked into the framework, it actually becomes a pain in the ass to work around it.

Or, maybe you are saying that it "doesn't help code organization" for some other reason which I fail to comprehend. Like, it doesn't provide an adequate level of abstraction between layers, or something.

Framework level support isn't necessary when the language has namespaces (packages in Java) and classes.

Using a module loader (AMD, CommonJS, etc.) is almost mandatory for large JS projects. Module loaders are the JS equivalent of namespaces in languages like C# while also serving as a dependency injection mechanism. This allows the client to load only the parts of the application it needs, while also allowing the developer to have different runtime configurations (aliasing a module to mock a data source for unit and functional testing for example). To be fair, Angular does have a module loader, but its very tightly coupled with the way the framework works, while the AMD spec is completely generic.

For a more detailed overview of why you'd use modules, look here: http://requirejs.org/docs/whyamd.html
 
[url=http:/civis/viewtopic.php?p=26798761#p26798761:1422o0ln said:
wb[/url]":1422o0ln]
I don't mind code organization provided for me in starter projects, or examples, or default settings, etc. but I do mind when they are built into the framework itself. Sometimes those structures just don't fit the project you're working on. If those things are baked into the framework, it actually becomes a pain in the ass to work around it.
Yes! Two years ago I observed that the trend has been *away* from what I called the "monolithic" framework (Rails + Clones) to a bunch of interchangeable parts. These days you don't buy an F150, you buy an engine block, a radiator, a suspension system, a drive train, and put it together. (Meteor is an exception...but I don't think it's going to be successful).

Edit: two pieces of advice I gave then would change. Don't sandbox JQuery (no point), and Typescript is the best Compiles-to-Javascript alternative, not Dart.

Regarding the OP, it's hard to gauge what kind of information you're really looking for. A "web app" is a bunch of pieces that all work together, and from your comments it feels like you are missing one of more of those pieces, but it's hard to tell which pieces you are missing.

Well put.
 

wb

Ars Legatus Legionis
25,208
Subscriptor
[url=http:/civis/viewtopic.php?p=26798907#p26798907:333z3loo said:
Ravensroke[/url]":333z3loo]
Framework level support isn't necessary when the language has namespaces (packages in Java) and classes.

Using a module loader (AMD, CommonJS, etc.) is almost mandatory for large JS projects. Module loaders are the JS equivalent of namespaces in languages like C# while also serving as a dependency injection mechanism. This allows the client to load only the parts of the application it needs, while also allowing the developer to have different runtime configurations (aliasing a module to mock a data source for unit and functional testing for example). To be fair, Angular does have a module loader, but its very tightly coupled with the way the framework works, while the AMD spec is completely generic.

For a more detailed overview of why you'd use modules, look here: http://requirejs.org/docs/whyamd.html

You don't need a framework to do module loading in javascript. You just need to include (and use) requirejs. Which is what most of those frameworks are using behind the scenes, anyway. So, I don't get how baking that into the framework helps anyone, especially when the framework has its own prejudices about where files and folders should be, and in what order they load, etc.
 
[url=http:/civis/viewtopic.php?p=26800427#p26800427:1k22pir3 said:
wb[/url]":1k22pir3]
You don't need a framework to do module loading in javascript. You just need to include (and use) requirejs. Which is what most of those frameworks are using behind the scenes, anyway. So, I don't get how baking that into the framework helps anyone, especially when the framework has its own prejudices about where files and folders should be, and in what order they load, etc.

I'm advocating either using RequireJS or a framework that implements the AMD spec over a framework with its baked-in module loader that "has its own prejudices" (Angular).
 

wb

Ars Legatus Legionis
25,208
Subscriptor
I guess I still don't understand your original criticism. "Help with code organization" shouldn't really be something I look for in a framework, in my opinion. I can provide my own organization, TYVM.

I do, however, understand the criticism of frameworks that actively work against you using your own organization. That annoys me to no end.
 

Feanor727

Smack-Fu Master, in training
83
Subscriptor++
Whoa... tons of responses -- thanks all!

to masonk: I was trying to say in my first post that I already know the difference between a div and a span and what a CSS class is. I guess I'm mostly interested in
3. What are some good ways of creating responsive web GUIs?

I've made some progress in the almost 3 weeks since the original post -- discovering jQuery UI helped a lot (although maybe there are better alternatives?), as did getting a firmer grasp on AJAX and the .html() setter (our server-side methods are generating HTML, not JSON). I'm working my way through "Javascript: The Good Parts," and trying not to pull what remains of my hair out over dynamic typing and the way JS handles variable scope.
 

krimhorn

Ars Legatus Legionis
39,865
[url=http:/civis/viewtopic.php?p=26870569#p26870569:3ubscb46 said:
Feanor727[/url]":3ubscb46]
3. What are some good ways of creating responsive web GUIs?

I've made some progress in the almost 3 weeks since the original post -- discovering jQuery UI helped a lot (although maybe there are better alternatives?), as did getting a firmer grasp on AJAX and the .html() setter (our server-side methods are generating HTML, not JSON). I'm working my way through "Javascript: The Good Parts," and trying not to pull what remains of my hair out over dynamic typing and the way JS handles variable scope.
What do you mean by "responsive"? If you mean responsive web design (i.e. the page "responds" to the size of browser window and positions/sizes elements accordingly) you're going to have to get really deep into CSS and @media queries. Or use a responsive focused .css framework like Bootstrap.

If, by responsive, you mean that it changes fluidly according to changes in the data or user input then you're going to want to look toward a two-way data-binding .js framework. KnockoutJS is a popular one but you'll need to use something else to modify your presentation based on changes in the data. AngularJS provides support for both the two-way data-binding as well as the presentation (via a descriptive directive syntax implemented as 'data-' attributes in the HTML).
 
Status
Not open for further replies.