PDA

View Full Version : Why prefer scripting instead Qt/C++ on webdevelopment?



Alir3z4
9th November 2011, 02:04
I know there is a lot of question around the Internet about it.
But now the question is why everybody prefer using python/php/ruby/... than using c++?, Don't mention that because they're make programming fun And yay, coz now we have boost, qt, ... for c++ , IMHO this is make programming fun and yay :D
I like to know why you don't like make your website project roll'n on Qt/C++ ?, And if you like it why there is no official plan on it?
Of course i know witty, CppCms and other stuff is available.

wysota
9th November 2011, 03:21
The answer is quite simple - most things people do with their webpages can be expressed in fewer lines of code in scripting languages than in C++. PHP is a high level language whereas C++ is more mid level (strong typing, predeclared variables, etc.).

Alir3z4
9th November 2011, 05:28
The answer is quite simple - most things people do with their webpages can be expressed in fewer lines of code in scripting languages than in C++. PHP is a high level language whereas C++ is more mid level (strong typing, predeclared variables, etc.).
Yeah, for instance python is sweet as well in expressing code and ... .
But is writing less code can be best reason? if you mean less code i prefer using ruby for it but you know ruby gonna be worse after a while on performance.

MaKo
9th November 2011, 08:25
One big advantage of scripting languages is their portability. You can execute the same script in Linux and Windows web servers, of course if that web server has the interpreter, as they many times have at least for PHP. Scripting languages are usually more productive (less time to develop), and as they are usually used for post-processing, the performance is not that big problem. If it is, it is many times solved by buying more and better server machines. Usually the performance is needed mainly in database engines, and those are written with compiled languages. You can make extensions to web server with C, C++ and such (like cgi, or web server modules), in case you need it and you can compile it to all the platforms the servers are running.

wysota
9th November 2011, 11:31
Yeah, for instance python is sweet as well in expressing code and ... .
But is writing less code can be best reason?
Yes.


if you mean less code i prefer using ruby for it but you know ruby gonna be worse after a while on performance.
Ruby is also a scripting language. And since the script only runs for a couple of seconds, such drawbacks as you describe are not significant.

Alir3z4
10th November 2011, 19:51
such drawbacks as you describe are not significant.
I made that line gray color instead of deleted before you meantion:p

So what about those toolkits, frameworks mimic libraries for c++, like cppcms, witty?, are they developers didn't knew this fact?

wysota
11th November 2011, 01:33
That's the Freedom of Choice. However it is obvious that scripting languages allow obtaing a good result in short time. The quality or speed might be worse than that for general purpose languages but the tradeoff is usually worth it.

Alir3z4
11th November 2011, 09:56
Thank you wysota (http://www.qtcentre.org/members/11-wysota), MaKo (http://www.qtcentre.org/members/32039-MaKo).
You make me sure to using all benefits of scripting language such amaz'n python,...
Actually i have exprience with bunch of webframeworks and honestly i like them.
But earlier when i saw wt such a wonderful web-GUI toolkit i was doubtful. (despite it's can never be good at being webframeworks ...)
And i kept this question in my mind, till i asked here and you guyz make me sure about it.

wysota
11th November 2011, 11:22
As far as I know wt is also a scripting language.

Alir3z4
11th November 2011, 11:25
As far as I know wt is also a scripting language.

what?
Maybe you know it as witty.
But this is the official wt's website webtoolkit.eu (http://www.webtoolkit.eu/)

wysota
11th November 2011, 12:11
So the fact that it has a webpage of its own means it can't be a scripting language? :)

Alir3z4
11th November 2011, 15:21
Com'n, i can't get ya.
What's ur point!
If you tak'n that fact, you shoulda take this fact i have a blog too, is this make me script'n language :D ?

wysota
11th November 2011, 18:53
So why do you think wt is not a scripting language? Because it uses C++ syntax? And please write proper English sentences instead of that trash talk.

Alir3z4
11th November 2011, 21:02
So why do you think wt is not a scripting language? Because it uses C++ syntax?
No it's not just uses C++ syntax, it's uses C++ itself.
And i work with it, write couple of useless :D examples and play with it.
You see wyosta i can't get your point, can you explain it little bit clearly.:cool:

wysota
11th November 2011, 22:58
No it's not just uses C++ syntax, it's uses C++ itself.
If you compile it yourself into a library/executable, then fine, it may or may not be a scripting language. However the sole fact of compiling (or not) doesn't determine if something is a scripting environment or not. Considering the fact that you are generating some kind of "script" that later gets translated to html/javascript, I would argue that it has some notions of scripting environments.

Alir3z4
11th November 2011, 23:42
Yes of course i'd compiled it on my machine, actually i wasn't successful to found binary package for distro.( despite that i found that after a while on archlinux repository )
i'd use it like Qt libraries, include.. and other stuff
Couple of month ago i post a new topic on wt forums about a scripting template language shortage. [topic link (http://redmine.webtoolkit.eu/boards/1/topics/2898)], but the answers isn't too helpful, maybe i don't get the way of wt.
BTW why anybody want to make a scripting language with C++ syntax style like ?

wysota
12th November 2011, 03:17
BTW why anybody want to make a scripting language with C++ syntax style like ?

Why not? I have seen (or at least heard about) at least two interpreted languages using the C syntax and they were both very successful in their domains. A syntax is just a syntax.

Alir3z4
12th November 2011, 04:09
Why not? I have seen (or at least heard about) at least two interpreted languages using the C syntax and they were both very successful in their domains. A syntax is just a syntax.
:D This one is interesting.
maybe i didn't made my point clear ;)