Announcing Opa: Making Web Programming Transparent 253
phy_si_kal writes "Opa, a new open source programming language aiming to make web development transparent, has been publicly launched. Opa automatically generates client-side JavaScript, and handles communication and session control. The ultimate goal of this project is to allow writing distributed web applications using a single programming language to code application logic, database queries and user interfaces. Among existing applications already developed in Opa, some are worth a look. Best place to start is the project homepage which contains extensive documentation, while the code of the technology is on GitHub. A programming challenge ends October 17th."
very expensive to implement (Score:5, Funny)
Every time you do something in Opa that is successful, you have to break a plate. Opa simply isn't economical to scale.
Re: (Score:2)
Hehehe... and in Dutch, it means "grandfather".
"Yeah, I wrote this program in grandfather and..." (voice trails off under whithering stare of boss)
This is why commercial entities do a namecheck before choosing names :)
Re: (Score:2, Interesting)
In German too. So Germany, Austria, half of Switzerland and Luxemburg are already going WTF or laughing before they even check if itâ(TM)s useful.
(It's not. There is a reason there are different languages: The right tool for the right job. Trying to auto-translate e.g. JavaScript into SQL or regular expressions, is bound to result in a horrible frankenstein monster [which luckily is as slow as a glacier]. And for those languages where itâ(TM)s easy, like PHP, Python, Java, C++, it's not worth it s
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Grandfather isn't even the right translation. "Grampa" would come closer. LOL
Re: (Score:3)
This is why commercial entities do a namecheck before choosing names :)
aka The Chevy Nova Effect
Re: (Score:2)
Along these same lines, There is a Toyota van here in Japan called a HOMY. In the local language (Okinawan), it means.. ahem.. female genitalia. Even so, the van sells fairly well.
Re: (Score:2)
AKA the urban legend effect?
"Nova" and "no va" mean two entirely different things in Spanish. Try both in your favorite translation software to see.
With so many confirmed international naming issues, it's odd that what must have started out as a joke is the one most people cite. "Nova" in Spanish, BTW, translates in English to... "nova".
Now, go to Snopes and check out Coca-Cola, Sting, the Rolls Royce Silver Mist, the slogan "Nothing sucks like an Electrolux"...
Re: (Score:2)
Hehehe... and in Dutch, it means "grandfather".
"Yeah, I wrote this program in grandfather and..." (voice trails off under whithering stare of boss)
This is why commercial entities do a namecheck before choosing names :)
But if the name was chosen before the checking policy was instituted, then they get to keep it. I think there's even a word for this practice...
Re: (Score:2)
And in (south american) Spanish it means "stupid", "idiot".
Re: (Score:2)
Re: (Score:2)
There's really no need to invent a language to justify that response, you know.
Re: (Score:2)
Among the major computer languages [tiobe.com] PHP [wikipedia.org] is Danish with a Canadian citizenship, Python [wikipedia.org] is Dutch, LUA [wikipedia.org] is Brazilian and Ruby [wikipedia.org] is Japanese despite its English name.
Even C++ would be Danish but Stroustrup was working at the Bell Labs when he invented it, furthermore it's an enhancement of C so let's say that the language comes from the US.
Re: (Score:2)
ti les re; den apogoreuetai oi mpura!
malista, einai upoxrewtiko to ouzo, alla den eimaste fanatikoi k'olas
How is it different from, say, Wicket or ZK? (Score:4, Interesting)
How is it different from, say, Wicket or ZK, or even GWT?
I can write complete AJAX-y webapps in Wicket or ZK, including database. They both store state of pages on server side, so AJAX becomes trivial (just rerender the page and send the difference in DOM trees using JSON).
Then there's GWT which compiles static Java code into JavaScript.
Re: (Score:3)
How is it different from, say, Wicket or ZK, or even GWT?
Not having to use Java?
Re: (Score:2)
Check the documentation, Opa runs on Java....
Re: (Score:2)
*I understand you were talking about the language, just pointing out we're not free form the clutches of Java on this one.
Re: (Score:2)
Re: (Score:2)
Oops, sorry for misunderstanding that and thank you for taking the time to clarify.
I'm thinking of something to make to try out Opa by the way. I looked through some samples and I must admit I like how it handles things like Canvas and "live" apps.
Re: (Score:2)
It's an integrated solution. You write one piece of code, and the compiler manages the AJAX interface. So you don't have to write your app in two languages and deal with communication between the server side and client side: the language hides that.
It seems like a good deal in a number of ways, and I think for a new application it might be a good choice. However, there are some problems—they have chosen to define a new language, rather than extending an existing language, so you have to learn and be c
Re: (Score:2)
That was 3 < 4, not Rule 34, in case anyone was wondering...
CGI.pm (Score:2)
You write one piece of code, and the compiler manages the AJAX interface. So you don't have to write your app in two languages
Sounds like CGI.pm to me! I never went for that. With a code generator you have to be thinking about what it generates all the time, or else restrict yourself to the lowest common denominator... on every feature. And still have a brittle result.
Template systems for the dynamic parts win for a reason. And it isn't because of any shortcoming of Perl, Ruby, or that Aelfinn one.
Re: (Score:2)
Sounds like CGI.pm to me!
Huh? How so? It doesn't seem to be at all like CGI.
Re: (Score:3)
Blah, blah, blah, blah, blah... more irrelevant nonsense
Business data is stored in Oracle and in various IBM systems. So, if you want to be more than a toy project for funny student work, you can pull data from those. It's as simple as that. That is, of course, unless you are going to create yet another cool thing from scratch and do not care. As I said, a toy with such limited usability that it can only be characterized as a student fun project.
Re: (Score:2)
It's different in that network communication is more or less transparent - you write a single program, not two clearly separated client and server parts (and then those in different languages).
Simply put, it's a lot like Volta [wikipedia.org], except that, apparently, didn't get anywhere - even though the CTP was neat (it even let you do integrated debugging, like "step in" on client and it would get you into the corresponding server entrypoint). I think there's something like that for Java also. So this isn't exactly new,
Re: (Score:2)
Why yet another language, though, I don't understand. We already have plenty that could be readily used for something like that (C# 5 with "async" feature would be very handy, for example), or you could take one and add some minor extensions.
Well, that's simple: when we started working on Opa, most the languages available today and that could be used to achieve similar features were simply not available. For the automated and secured client-server distribution scheme, we needed some advanced static checking, which ruled out Erlang — or which would have required us to largely reinvent that language. For client-server distribution and for handling many clients, we needed some advanced concurrency mechanisms, which ruled out most other lang
Re: (Score:3)
Well, looking through the docs more closely (rather than just the chat example), it sure does look a lot like a dialect of ML to me now, so my earlier comment on "taking an existing language and adding extensions" was redundant. Well, thank God it's statically typed - I'm a bit tired of all the dynamic typing around lately, esp. when its evangelists bring forth arguments which made sense with Java, but don't anymore when you have pervasive type inference.
One thing there that made me wary is the built-in dat
Re: (Score:2)
One thing there that made me wary is the built-in database. So far as I can see, it is essentially just a hierarchy of typed key/value stores?
Well, it is a bit more sophisticated than that. The database is a (typed) graph, so wherever a relational database or a key/value store would store keys as references, the database can store pointers, for instance. This is very powerful and this covers most cases. We also have plans for multi-field look-ups, joins, etc., much of which is actually implemented (but not activated in the released binaries/default config), but finalizing it will have to wait until we find some time and manpower.
it seems that you don't have an IDE yet, for example?
Actually, we h
Re: (Score:3)
... and my point is made.
Nice sidestep.
Looking forward to seeing what replaces you.
I don't like the look of them colons (Score:2)
I don't know about you but I've never really liked the look of programming languages that use colons. Semi-colons are OK but two dots, one on top of the other? That's just craziness! And "do" statements remind me of BASIC... yuck.
Re: (Score:2)
Obigtory..... (Score:3, Insightful)
This [xkcd.com] seems to be getting some use lately.....
Which open-source license? (Score:3)
If I write a web application using Opa, and the server end accesses a database - am I required to release the sql username and password?
Re: (Score:3, Informative)
Probably the most important implication of AGPL is that it requires you to provide a way for your users to download the sources of the application. In fact Opa facilitates that by automatically enriching the server (in release mode) to serve the source code of the application at a special /_internal_/src_code URL.
But this is not the end of the story. We believe in free software (hence the AGPL license) but we also understand that it may not be very suitable for commercial users of Opa. Such users will be able to obtain a private license (paid). This will allow them to keep their sources closed if they wish to do so and will provide us with funds to further develop and improve Opa — win-win situation :). If you are interested in more details about obtaining such a license, do not hesitate to contact sales@mlstate.com, where we will try to answer all your questions (including pricing).
http://blog.opalang.org/2011/08/opa-license-contributions.html [opalang.org]
Re: (Score:2)
Probably the most important implication of AGPL is that it requires you to provide a way for your users to download the sources of the application. In fact Opa facilitates that by automatically enriching the server (in release mode) to serve the source code of the application at a special /_internal_/src_code URL. ... We believe in free software (hence the AGPL license) but we also understand that it may not be very suitable for commercial users of Opa.
Whether I'm a commercial user or not... why would I - or anyone - ever want web visitors to be able to grab the SQL username and password I'm using in the back end?
Re: (Score:2)
Whether I'm a commercial user or not... why would I - or anyone - ever want web visitors to be able to grab the SQL username and password I'm using in the back end?
Are saying that people actually write username and password in the source code ?
Thats a no no.
Use a configuration file containing secret information so you can protect it. Don't hardcode parameters that might change.
Put the SQL information needed in a configuration file that you read before opening the database. Then its easy to change
database,
In the name of humanity, stop. (Score:2)
Whether I'm a commercial user or not... why would I - or anyone - ever want web visitors to be able to grab the SQL username and password I'm using in the back end?
You are doing it wrong. Please turn your geek card. Seriously. This is one of the stupidest things I've ever seen, typically done only within the bowels of them most incompetently written software ever. Configuration parameters of any kind are never, ever, ever, ever put in code. It's like Jesus Christ man, this is shit that is taught in in freaking sophomore-level programming classes (seriously.)
Poor unexpected victims the ones who pay crappy, shit-flinging code monkeys for developing their software afte
This license is poison (Score:2)
I think the concept of Opa is neat. Other projects may have tried and failed at this, but maybe the Opa authors could make it work.
However, the choice of license completely precludes me from even trying it. Sure, I release source code for some of the stuff I make (even though nobody looks at it). Here's why:
Let's say I try out Opa, make some side projects with it, fall in love with it, and I get good at it.
Now, either at my day job, or on my own, I come up with super awesome project X that I want to buil
Re: (Score:2)
Oh please, you're just being difficult. If you want an entirely closed-source application, you can pay them the licensing fee. If you want to go the open source route, but don't want to reveal your passwords, don't put them in the source code: store them in the database.
Re: (Score:2)
And how, pray tell, are you supposed to get the password out of the database without the password?
Re: (Score:2)
Re: (Score:2)
http://opalang.org/resources/book/index.html#_setting_up_storage [opalang.org]
Re: (Score:2)
That really needs to be tagged "whatcouldpossiblygowrong".
Re: (Score:2)
For me as a German (Score:5, Funny)
this language seems to be obsolete from the beginning.
Re: (Score:3)
It was grandfathered in with an older browser :P
Javascript as assembly (Score:2)
Am I the only one scared by the new trend of "languages that compile to Javascript"?
Coffeescript, Opa, there were some more.
I understand first compiling to Asembler and only then to machine code. I understand early C++ compiling to C. Various languages to bytecode...
But really, while I love Javascript for many features it provides, creating yet another layer of indirection on top of it seems to serve only one purpose: boost sales of faster hardware...
Re: (Score:2)
There are guys doing this at my company, and the reasoning for it is that web developers know JavaScript. They don't necessarily know the back end language that is used to generate web pages (Perl, Java, PHP, etc...).
Rather than have web developers spend time learning the back end, they display a blank div and use AJAX to request the data that they want. Then they can create the web page in JavaScript. I am not sure that this will be good way to go, but I do understand why the business wants to explore t
Re: (Score:2)
What you mention, the pattern of generating pages using AJAX, is still fairly new. I use it a lot for data that is updated in real time, and some websites are using it for static data as well. I very much like it for cleanly separat
Re: (Score:2)
Re: (Score:2)
It depends on how cleanly it maps to Javascript's concepts. I don't really see almost anything in the core Opa language [opalang.org] that doesn't map reasonably well to JS. It shouldn't be particularly slower than JS by itself.
Re: (Score:2)
OTOH, I've seen one line of Coffeescript create a dozen of JS lines. Sure it means writing faster. But the problem with writing faster is that you spend the same amount of effort to create the same amount of lines of source, and suddenly you have five times as much of actual runtime code.
Re: (Score:2)
perl?
Re: (Score:2)
Perl at least compensates for its ugliness with a wealth of useful features, and the ability to write terse code.
Re: (Score:2)
[......] For those of us who are good programmers, this is very difficult to do.
Perhaps you're not as good a programmer as you think you are then.
Integrating everything into one thing? (Score:3)
Re: (Score:3, Interesting)
Integrating everything into one thing seems like a poor idea. Sure, it makes it a little easier for the dev, but in the end, you are just learning 5 times the amount of Opa when you could learn each thing.
Well, that's not quite true. Having the same language for database manipulation and for in-memory manipulation is a huge time-saver. Having the same language (indeed, the same piece of code) for server-side validation and for client-side validation is more efficient and less bug-prone. And you have only learnt one thing.
Not only that, but can one thing really do all those tasks the other things do, and do it as well? Even if it can, it's harder to keep all of those on a level, you can't replace those parts if you find something better. It just seems to me that splitting things down into the parts seems like something we should be doing, not reversing.
Ok, on this, you may have a point.
I also really don't like the whole compiling to JavaScript behaviour. Maybe just because I don't like JavaScript.
Well, that's part of the point: with Opa, you do not need to write any JavaScript.
Caveat I'm part of the Opa team. Well, worse than that, I'm the archite
So here's some example code (Score:4, Informative)
No idea whether it's viable long-term, but I thought it's really interesting. It does way more than GWT does, for example. It's also statically typed, yay.
Here's some example code from the tutorial [opalang.org]. This is a chat room [opalang.org]. Apart from CSS, this is the entire soure code required to create the chat room server. Yikes. Had to get rid of the comments to appease the spam filter, unfortunately.
Wt (Score:4, Interesting)
Why is a new programming language required to "make web development transparent"?
Opa automatically generates client-side Javascript and handles communication and session control. The ultimate goal of this project is to allow writing distributed web applications using a single programming language to code application logics, database queries and user interfaces
Wt [webtoolkit.eu] does exactly the same but in C++. You develop webapps like desktop apps: widgets, ORM, etc. No need to care about Javascript, HTML, etc. Compilers available on all platforms. The result is a single binary which includes an embedded HTTP(S) server.
While I agree with what Opa wants to achieve, inventing a new programming language for that end is unnecessary and, in fact, will become a burden: they will need to maintain both the language and the library. But actually the value lies in the library, which is the one that needs to deal with HTTP, Javascript, AJAX, etc
Re: (Score:3, Informative)
Re: (Score:2)
Epic fail (Score:2)
Opa automatically generates client-side JavaScript
Just what we need, more sites spewing out poorly-designed client-side script badly rendered by any number of JS browser implementations. Like many others, I do everything possible to block JS...why does anyone think the future lies in more client-side code?
Re: (Score:2)
Name one single must-have feature that HTML+CSS can't provide, and the browsing public can't live without.
Re: (Score:2)
Name one single must-have feature that HTML+CSS can't provide, and the browsing public can't live without.
AJAX. Almost any large website will include dynamic content to some extent. Haven't you noticed?
Re: (Score:2)
Google search, gmail, twitter, and facebook could all function perfectly fine without JS. Of course the UI wouldn't be as elegant, but JS is not at all a requirement for their functionality.
Dear Creators of Opa... (Score:4, Insightful)
Re: (Score:3, Informative)
Dear drgroove,
Thank you for your considerate feedback.<sarcasm mode="off"/>. While we understand very well the drawbacks of Opa not being Object-Oriented (at least not in the usual meaning of the term), there are several reasons for this choice. The first and most important of these reasons is that experience from 15+ years of experienced developers writing scalable systems with Object Oriented Programming Languages, and concluding that OO is not the right paradigm for the task, and that other paradi
targeting javascript? (Score:2)
So they're targeting javascript. This is going to be, uhm, not the most efficient approach.
What should happen, imho, is for W3C to develop a (non-garbage collected, as in no garbage collection) low level language, which can serve as a platform for other languages, like this one. Current compiler and virtualization technology can easily and efficiently translate such low level language into something native. And as a result, we could have a much richer web environment, and we'd not be dependent on that one s
Re: (Score:2)
That's good, but then it still is an important part, since building web-apps nowadays is getting more and more important.
Well, I guess we'll first need to have a bunch of languages targeting javascript, before W3C sees the light. Sigh.
AGPL makes Opa dead on arival (Score:3)
I don't mind making any and all my code available to others. And I understand the "give-back" qualities of GPL. But a GPL language that makes every program written in it have the GPL License?!? Good grief. I am laid back about the whole License Wars, but AGPL gives me pause.
I probably won't even bother learning a little bit of this language to understand it's good qualities. Plus I've never cared for indentation defining blocks.
threads (Score:2)
How does opa handle multiple threads of execution? Any decent server nowadays just needs to have multiple threads of execution, sometimes even thousands of them to work in a non-blocking way. Opa seems to be "non-blocking" (I read from the tutorial), but you have non-blocking and non-blocking... One version simply uses one thread and an event-loop (aka non-preemptive multitasking). This is not truly non-blocking, as large I/O operations in one task still prevent other tasks from working. And does opa allow
Re: (Score:2)
Hmmm, fibers may not be the right tool for making low-latency (highly responsive) multi-user applications. The problem is that when one fiber is doing a lengthy task, the other fibers are sleeping until the first fiber yields. That's why the popular web-servers go through all the trouble of spawning multiple threads instead of just using an event-loop approach (using select, epoll and kqueue). Sure, you will not have any additional context-switching overhead that way, but today low-latency is what counts.
Or
Re: (Score:2)
Even if the fibers are small, they may invoke kernel calls which take a long time to complete (for example a large I/O operation). How do you ensure that other fibers can continue their work in such cases?
Further, the smaller your fibers get, the more overhead you introduce for context-switching, right? Because I can imagine that after execution of each fiber you need to do some scheduling (even if the current fiber remains active). Is this context-switching faster than the kernel can do it?
Finally, I'm int
Re: (Score:2)
We have lightweight threads can be preempted any time they are not in (Opa) kernel mode, and rely on asynchronous I/O (epoll/kqueue/completion ports) to achieve non-blocking I/O. Does this answer your question?
Could you explain this a little further? In my understanding, the epoll based approaches are all synchronous, non-preemptive. That is, in such a method you wait in an event-loop for events, and when an event arrives, you perform some action, effectively keeping other events in the queue. This means that if one event triggers a lengthy computation, then other users of the system may experience non-responsiveness.
Re: (Score:2)
I was just thinking: this is exactly what we need! Yet another programming language. And even more "web apps". Yay!
You're not getting it. Don't think of web apps as some separate application layer, think "web". This is where its going, its already there to be honest. If you're not prepared for that simple fact you're in for a bumpy ride as its only going to get more "webby" in the future. And a new language that ties all that in a more comprehensive way is going to be a good thing.
Re: (Score:2)
Re:yes! (Score:5, Insightful)
Yes, and if Javascript weren't so bloody limited, that would be a great solution. Why, oh why, couldn't they just have embedded Scheme, which has all the wins of Javascript, and none of the limitations? Sigh.
Re: (Score:2)
Re: (Score:2)
Is there any reason that a language like Java, C#, C++, Python, Perl or Ruby, or with the appropriate framework and compiler couldn't do the same thing that Opa is aiming to do?
On Hanselminutes, Scott Hanselman interviewed a guy who made the statement "Javascript is the machine language of the Internet", alluding to the fact that it is better from a productivity and performance perspective to develop in a lot of other languages (C# in this case) and have compilers that know how to create optimized, minimiz
Re: (Score:2)
Re: (Score:2)
A framework would simply provide useful constructs to use in the language the framework is built for... the heavy lifting would have to take place in a separate compiler. I do not see a reason why such a compiler could not be created for any other language.
Re: (Score:3, Informative)
The developers are strongly backing a particularly virulent licence, Affero GPL. That requires that not only are the Opa tools open source, but any software you write using Opa is infected as well [opalang.org] .
The claimed alternative is to buy a commercial licence for Opa, which lifts the open source conditions, but costs an as-yet-unconfirmed amount of money.
To my knowledge, there is no programming language that is even moderately successful today that does not have a good quality, free-as-in-beer, no-strings-attache
Re: (Score:2)
Seems to me QT and GCC were both successful with that sort of licensing.
Re:needs time (Score:4, Informative)
I think you're misunderstanding the concern. If I build my code using GCC, then GCC itself may be open source under whatever licence, but my code is mine to license as I wish. If you follow the link I gave above, you'll find that the Opa guys think that not only Opa itself but also anything you write with it should be forced open (by their definition of open, which is different to almost anyone else's). That's the kind of policy that gets abrupt from corporate lawyers saying "Put this within 50 miles of our network and you're fired". It's also incompatible with many other popular OSS licence policies.
Re: (Score:2)
OK I just read the link.
That license is less bad than the QT Free license (mid 90's). Which basically said you had to give your application away, or make source available or you needed to use the commercial QT. As an aside, this was the whole problem with KDE. While KDE (GPL) qualified under the QT license just fine. QT didn't qualify under the GPL. Thus the opinion of Debian legal was that no one but the KDE foundation could legally distribute KDE since a licensee (but not the copyright holder) cannot
Re: (Score:2)
There are two reasons that GCC does not cover that kind of code. One is that the mere act of compilation (a mechanical translation of the code from one form to another) does not implicate copyright. The other is that GCC includes a specific exception for standard header files and things that it compiles or links into your code as a result of the language features you use. The Opa developers explicitly reject [opalang.org] that approach.
Re: (Score:2)
Actually compilation may impact copyright. You need to be licensed for various media. So for example if you have a music license for casette that doesn't permit CD redistribution. The courts do not look upon purely mechanical processes as not creating a new derived work.
Compilers on the other hand almost always explicitly state they aren't invoking those rights. GCC makes sure all libraries that are distributed standard (i.e. dynamic) are LGPL. But... there are GPLed 3rd party libraries and they would cr
Re: (Score:2)
I spent about 5 minutes on their site before I found that little gem in their blog, and from that point onward Opa wasnt something I was considering further investigation of.
A language with a forced license on your code before it's even written? No thanks.
Re: (Score:2)
I'm a newbie and slowly learning RoR right now, so I'm interested to learn that it is on it's way out. What has replaced it? What do you suggest learning for web development currently?
Re: (Score:2)
if you want to be in the web dev game, you need to know everything. RoR, Some PHP frameworks, some Python ones, Catalyst for perl would be good, Javascript (the good parts) JQuery, HTML 5, XHTML.
The Web Dev world is very complex and sucks.
Re: (Score:2)
Re: (Score:2)
Uh, what? I'm guessing you posted as AC because you didn't want to get modded down for posting flaming bullshit. Let me guess, you're a Perl developer who's still pissed Perl* doesn't offer a comparable framework and still won't accept the fact that Perl 6 will likely take another 5 years and all the shiny new functionality has been available in Ruby since you first heard about it. Rails is still very alive and well and is used in quite a lot of major sites. Rails 3.1 has some really nice improvements as we
Re: (Score:2)
That would be like a gazelle getting annoyed because it can't ride a bike.
Re: (Score:2)
COBOL runs the world.
Re: (Score:2)
Re: (Score:2)
Opa automatically generates client-side JavaScript
From http://www.amazon.com/Stealing-Network-How-Own-Box/dp/1931836876 [amazon.com]
Client-Side Security Doesn't Work
Appendix - "The Laws of Security by Ryan Russell"
ergo - this is bad for security.
Re: (Score:2)
Re: (Score:2)
Compiled their 76-line hello_chat.opa into a 30M executable
In those 30Mo you have just everything (the web server, the database engine, the scheduler, the page engine, the session engine, your webpages source, css, the generated js, etc) ! It's a standalone binary that just works on your server without having to install anything more. Did you check the size of the LAMP / Java / Ruby packages?
I would love to see some eCom or other complex sites written in opa to convince me that this is a viable alternative to Ruby, Java, PHP, etc.
MLstate did launch an eCom-like site : http://jetleague.com/ [jetleague.com] And I just check the binary on our server: 17Mo (yes, I guess it has been upx-ed)!