How to deal with shifting from Software development to Web development

CrazYmonkeY159

Expert Member
Joined
Sep 13, 2007
Messages
2,142
Reaction score
0
Location
CPT/PE
Now this is a very broad question, but I would like to try out something new, i've been developing software (C/C++) for ages now and (just for fun) i would like to take a swing at web development, now a couple of things I have no idea about.

How is your development environment set up? like for eg for normal Java/C++ you would have to code compile and run using any ol' IDE

but what happens when it comes to web development using php/mysql/apache? where does javascript/JSON fit into the mix? do you just develop your code and try to run it in a browser? to learn php should I learn the bare standard of PHP and then jump to ZEND/Cake? or should I just try to learn one of these frameworks from the get go? I have a good idea of where php/mysql/apache fit into the whole model, but where does jscript fit in?

Thanks in advance - :D
 
As a PHP developer but come from a C background (it was a hobby) I would say go raw all the way and avoid frameworks for as long as possible. Its a different way of coding as your code is no longer interactive so there is a lot you don't need to do.

Leave Javascript for latter, its the eye candy component of web development. A good developer will never rely on Javascript being the only way for a user to complete a task, it should only complement and enhance the user experience.
 
How is your development environment set up? like for eg for normal Java/C++ you would have to code compile and run using any ol' IDE

The web browser is the "compiler" or more precisely, the parser... and thus your code can be any text file thats called as a URL in the browser. You use a debugger (I use Chrome that has the most insanely cool debugger under Tools>Developer Menu) or Firebug for Firefox to see where there are errors / problems in your markup / code. You can jam <script></script> tags anywhere in a document and write some javascript. javascript allows you to manipulate the html code (or DOM as its known) in addition to logic like loops and arrays, etc...

JSON is a javascript object like: var obj = { name : 'stricken', surname: 'badass' } ... think of it as an associative array. this is popular because it can be serialized and transmitted to / from the server.

Browsers also do best guess when they parse ****ty html. Thus it will always render something.... if it cannot parse / recognize an html tag pair, it interprets it as text and dumps it to the browser window anyway.


On the backend... you need to learn vanilla PHP first. Its v. similar to C in some ways so it wont be massive learning curve. the biggest lesson... all variables start with the money... $ : )


And to answer your last question.. javascript (nothing to do with java the interpreted language) run on the client side. So your PHP processes data on the server, and JAvascript on the browser. In this way... after yeeeeeears of swearing and puking and drinking red bull over reams of jquery (a javascript framework), you eventually offload 99% of the processing to the browser... thus relieving your server to the extent where you pretty much only have to handle authentication and database access. And then... a few years after that... HTML5 comes along and now browsers have databases as well... which leaves... authentication. That i do with a shell script echoing the entire javascript boot package in one go to the browser if the request is valid... thus making my PHP skills rusty since I do almost nothing server side anymore.

And this gobbledygook in the previous paragraph results in what is known as a Web Application, and not a Web Site, as 90% of "web developers" out there cannot distinguish between by saying that javascript is "eye candy". Yea maybe 1995 thinking said that, but since we have moved on to 2011, do you think Google Docs, or Facebook or Twiiter could work without javascript? LoL.

Javascript is the most widely used language on the PLANET. But no-one took notice cos it was an open standard (from ECMAScript), and didnt have a Microsoft sticker stuck to it. Show me any other language that can be run/interpreted by as many devices as javascript? (besides HTML which isnt a language but a data structure.)

fck i can waste my time on posts. ffs. sorry cbrunzo... no hard feelings. as a javascript ninja i get a bit twitchy when people disregard the language that powers the modern internet as "eye candy" by considering that you really still need to cater for Abdhulla in Islamabad rocking IE3 on a Windows98 box.
 
Last edited:
As a PHP developer but come from a C background (it was a hobby) I would say go raw all the way and avoid frameworks for as long as possible. Its a different way of coding as your code is no longer interactive so there is a lot you don't need to do.

Leave Javascript for latter, its the eye candy component of web development. A good developer will never rely on Javascript being the only way for a user to complete a task, it should only complement and enhance the user experience.
I'm not attacking you personally but that in my opinion is the most obvious sign that someone is inexperienced or unable to adjust to changes. No offense meant.

You spend a lot of time writing code that someone else has already done for you (boiler plate code). Using a framework has so many advantages: More secure code, more robust, better performance, list is long.

That is if you use a decent framework. I'm not a PHP developer so I can't fully back my opinion in the PHP world but in the Java world only beginners that lacks understanding of the environment don't use frameworks.

As to the Javascript opinion, I'm with stricken on this one. The days of that thinking is over. Even in PHP.

Google Web Toolkit for example has moved the application from server-side to completely client side with calls to the back-end. Believe what you want but the company I work for (A mayor one, I guarantee you have heard of us if you aren't a client) we use GWT in most of our applications. These applications run in the back end completely on Java and IBM Mainframe and the front end is completely Javascript which makes AJAX calls to the back-end.

And the system handles much higher volume now. The future is client side code with back-end calls. Places less load on the server and your application scales much better.
 
...And to answer your last question.. javascript (nothing to do with java the interpreted language) run on the client side. So your PHP processes data on the server, and JAvascript on the browser. In this way... after yeeeeeears of swearing and puking and drinking red bull over reams of jquery (a javascript framework), you eventually offload 99% of the processing to the browser... thus relieving your server to the extent where you pretty much only have to handle authentication and database access. And then... a few years after that... HTML5 comes along and now browsers have databases as well... which leaves... authentication. That i do with a shell script echoing the entire javascript boot package in one go to the browser if the request is valid... thus making my PHP skills rusty since I do almost nothing server side anymore...

This paragraph is why I am too scared to get into web development. This just makes me want to turn around and take my ball back home. Regular desktop development a few APIs evolve a bit, the IDE gets a bit more bloat every year or two and everyone goes on as normal. This stuff, this stuff is scary.
 
Just a question about javascript, is it processor intensive? do all mobile devices support it?

What are the advantages and disadvantages of doing all services client or server side?

Oh and thanks for the decent responses. :D
 
Just a question about javascript, is it processor intensive?
Depends on the browser. If you run IE7, yes and it might be slow, definitely slower than other (better) browsers. Chrome, IE9, Firefox, Opera, not really.

do all mobile devices support it?
It is dependent on the browser, not the operating system or device. So to answer that question, I have no idea. Depends on the browser they use.

For modern phones, they probably do have support, for older phones almost certainly no.

What are the advantages and disadvantages of doing all services client or server side?
Client side:
+ You can get a desktop look and feel easily. Not that you would want to because desktops are IMHO bad interface and many web-sites do a much better job than many desktop applications. It's responsive (eg. you click and it happens)
+ Lower server load = If done correctly you cache requests on the client side and only transfer the delta to the user from the server.
- Browser compatibility is a problem with IE6, IE7 isn't great but libraries make it close to seamless. Pretty much IE is the biggest problem. It is easily the most terrible browser on the market and unfortunately the most widely used.
- Higher performance hit on the client side, CPU wise
- You can't always control the environment so just like a desktop application, sometimes you get support issues and you know it is a problem with the client browser and/or their configuration but how do you remedy the situation.

Server side:
+ Because it is mostly HTML it renders on even on old browsers without much effort (although it might look different). Cellphone support might be better but if a cellphone has issues with JS it probably has issues following the HTML specs.
+ You are in complete control, you send the client HTML and they send back posts which contain the data you need. Each time you generate a new HTML page and send it. Makes it less likely you'll have client side code that might break
- Higher CPU load on the server
- Higher bandwidth usage
- Every time you click or do something on the client side it has to be sent back to the server so the entire page reloads. Hardly feels anything like a desktop app.

Example of a server-side app with client side JS: Gmail
Bit of both worlds: MyBroadband
Example of a completely server-side app: Telkom web-site

Pretty much a quick rundown. Others can add here.
 
Last edited:
How is your development environment set up? like for eg for normal Java/C++ you would have to code compile and run using any ol' IDE

IDE's don't really RUN anything. They're great for editing and intellisense. I think with some work you might be able to debug PHP, but that's a bit beyond most PHP developers.

where does javascript/JSON fit into the mix? do you just develop your code and try to run it in a browser?

Javascript is to get stuff info from your page and make the page do funky stuff.

JSON is more of a lean format to transfer data around.

Whatever you do, get into JQuery. It runs in a browser (plain old HTML) without having to host it in a webserver like apache.

Obviously you can integrate it with PHP too under apache.

ANY developer code in PHP. Some don't have design knack, but its as easy as falling off a log.

Work through a book. Get yourself PHP for dummies (no offence) and that will teach you the ropes.

THEN experiment wit ZEND and Cake..ie get the basics right.

Hope that helps.

FWIW...I was a Delphi developer, been a .NET developer for 7 years and I LOVE PHP, HTML, jQuery.
 
Now this is a very broad question, but I would like to try out something new, i've been developing software (C/C++) for ages now and (just for fun) i would like to take a swing at web development, now a couple of things I have no idea about.

How is your development environment set up? like for eg for normal Java/C++ you would have to code compile and run using any ol' IDE

but what happens when it comes to web development using php/mysql/apache? where does javascript/JSON fit into the mix? do you just develop your code and try to run it in a browser? to learn php should I learn the bare standard of PHP and then jump to ZEND/Cake? or should I just try to learn one of these frameworks from the get go? I have a good idea of where php/mysql/apache fit into the whole model, but where does jscript fit in?

Thanks in advance - :D

Firstly stop thinking about it in terms of "shifting from software development to web development"

Web development still needs software development. Web development refers simply to a platform.

In reality, a lot if your effort will most likely still be on the traditional back end database.

The "web development" is the interface. It still requires a software developer.

One reason people fail at web development is that they think the lessons learnt in software development no longer apply
 
One or two notes to consider when moving to the web as a development platform (well said, zippy):

Session. Learn what this word means. Coming from a desktop platform you will be used to a state-ful environment. The web is, at its core, stateless. Every web call is in essence a new application. The modern web servers of today provide for state between page calls with Sessions.

Security. The most important word you should learn (the second is Accessibility). No longer does your security happen at the beginning of the app - it is something you should take into account on every page. I'm not just talking authentication, either. Do your homework regarding SQL injection, XSS (Cross-site scripting) and the like. As mentioned above, don't rely only on Javascript for validation (but please, please learn Javascript/ECMAScript - your users will thank you), but run validation checks on the server as well.

It's a scary world out there, but I've been developing for the web for over 14 years now, and it's never been so much fun. Pick your server language, learn HTML5, CSS, JavaScript, and get your head into AJAX, JSON and XML. That should get you up and running easily, and before you know it you'll be churning out mobile/web apps with a difference. ;)
 
I'm not attacking you personally but that in my opinion is the most obvious sign that someone is inexperienced or unable to adjust to changes. No offense meant.....

Perhaps my comment came across wrong. Using frameworks is important as it cuts out a lot of unnecessary coding but I see all to often PHP developers who only know how to code with a framework and cannot do a simple application without one but the guys who started out coding from the ground up get the most out of frameworks as they understand how to do things with & without the framework. And sometimes you just have to write something small that could just be achieved without a framework, like a simple PHP CURL script to do basic web scraping.

Using a JS framework is most important with all the different browsers and compatibility issues but understanding the basics is also vital. There are also instances where you cannot use JS like a web page that could require automated population, an example is a feedback page that a callcenter application that I maintain has to update automatically.

Don't reinvent the wheel when your coding an application at work, but doing it during a discovery session with a new language/system is highly recommended.
 
Perhaps my comment came across wrong. Using frameworks is important as it cuts out a lot of unnecessary coding but I see all to often PHP developers who only know how to code with a framework and cannot do a simple application without one but the guys who started out coding from the ground up get the most out of frameworks as they understand how to do things with & without the framework. And sometimes you just have to write something small that could just be achieved without a framework, like a simple PHP CURL script to do basic web scraping.

Using a JS framework is most important with all the different browsers and compatibility issues but understanding the basics is also vital. There are also instances where you cannot use JS like a web page that could require automated population, an example is a feedback page that a callcenter application that I maintain has to update automatically.

Don't reinvent the wheel when your coding an application at work, but doing it during a discovery session with a new language/system is highly recommended.

Ah I see, yes I agree 100%
 
Top
Sign up to the MyBroadband newsletter
X