Greetings, let me introduce myself. My real name is Robert Simmons and I am a very Senior Java Developer who has been doing Java since 1.0. I have written two books on the language (namely "Hardcore Java" in 2003 and more recently "Maintainable Java" which is eBook only). So I know my way around the Java language. I have seen Java go through a lot of iterations, growing pains and so on. I know its strengths and its weaknesses. This is what brought me to the Scala Language. I have done a couple of projects in Scala but I wouldn't say I am an expert, at least not yet. ;)
So I wanted to bring you all into my latest brain storm and solicit input from the community. Lets try and keep it professional even though I will start by throwing a bomb. Well, a debate bomb. :)
Scala has a lot of promise in the future but I see a couple of current problems.
1) You can be a mediocre dev and handle Java (albeit not well) but you cant handle Scala unless you have a good grounding in Computer Science. Unfortunately the IT industry subsists on a large number of mediocre developers and that is just a practical reality that has to be faced. As the language matures this issue might abate due to accumulated knowledge and good API development.
2) The Scala community needs a standards approach rather than just a rapid agile environment. What I mean by this is that when you constantly break binary compatibility with previous releases, it makes it a tough sell to executives. Furthermore, if I go to sell using Java to a company, I can point out standards bodies and other respected business entities. With Scala, the sell is much tougher.
3) The reason for my post, is that Scala needs a viable SOA platform.
Lets take some well known frameworks in Scala and look at them from a business point of view. Now I know there are actual businesses using Scala and that is beside the point. Early adopters have to be set aside in this debate and we have to tackle the concept of getting Scala into well established businesses and that has a lot more to do with business than code.
Lift: Great for development of web apps if you already know Scala. Horrid, if you are a newbie. Beyond that it needs more to be viable for business.
Play Framework: Again, great for development of Web Apps and easier to use than Lift but still missing a lot of things a business needs.
So if we were to develop a perfect business SOA platform with pure Scala, what would it look like? What would be the essential features. This is the brainstorm that I wanted to bring you all in on. If I think about J2EE platforms (Glassfish, JBoss as well as the standards under them) I am driven down some paths of thought.
1) The platform has to have an API to work with that accommodates medium and low skilled developers. If you MUST be an A player to even use it, it wont work in business. You may need to be an A player to extend it, but development should be a snap.
2) The platform cannot be purely web focused. Although web apps are a big part of modern business, any business with a sufficiently complicated domain needs much much more. Lift and Play do web well, but not other things.
3) The platform can probably do without the features of IIOP and CORBA. Interoperability with those two old technologies can be accomplished much better through the use of SOAP and REST services.
4) Yes, we have to do SOAP. RESTful is great for small things but when the domain models get complicated soap is a necessity. There is little point screaming about it. Also if the platform can't talk SOAP, it can't interoperate with existing Business applications and that is a deal breaker.
5) The platform has to be standards based. Although one can be implemented in scala without doing a waterfall standards approach, the standards should be developed in an agile manner so that there is the possibility of more than one vendor in the space. Businesses hate being locked into only one platform without competition.
6) The platform has to define better separation of business logic and presentation than all prior platforms to give it a great selling point. The promise of true UI / Service separation should be finally realized. This is an odd thought perhaps but what if the platform didn't do web at all, it didn't do templates (groovy, scala or otherwise), didn't do anything except the back end SOA. If we freed the platform from all of those issues, then true separation could happen. Bear with me here:
Lets say we were developing a big product with a big back end and some Administration console with a customer UI; the amazon model (aka the E-Superstore). We have a UI for customers, also for shipping and administration of products and so on. So we propose our new ScalaSOA as the main bus for this system and the business asks us how the UI will be built. We reply that it will be AJAX based, served on an Apache Web Server. The only involvement ScalaSOA would have is to serve JSON or XML documents to the front end UI. Everything else is handled with static HTML, AJAX or similar mechanisms. Our users will then have a rich front end that can be built by UI designers and graphic artists and they let the devs know what data they need.
7) The platform would have to implement concepts of clustering, componetized deployments (think EAR files without all of the annoyances of EARs) and so on.
8) The platform would be able to reload classes at runtime enabling the developer to change apps on the fly such as is possible in play framework.
9) The platform would be componetized and designed to be extended. With the evolution of J2EE, they had to massively retool the various platforms to comply with standards. Each standard should, instead, be designed to be a component that can be mixed and matched. The vendor develops the backbone bus and can even drop in components for other vendors. Something akin to the OSGI model of providing services. Think of this in the context of an EAR deployment. If there is a standard for SSA (Scala Service Archive) of 1.0 version and it gets updated with 1.1, the old 1.0s should still work if the SOA Platform possesses the component to load the old style. The new one may have more features but the old will still work.
Anyway, I don't want to just drone on. I would be interesting to hear comments from the other readers of this list even though I have many more ideas. The next step, of course, is to organize the effort. In conclusion i would just like to say that Scala is a great concept, perhaps the next Java. But it needs to pull itself out of R&D and get practical. That means making it business viable. Currently there are few tools on the market for scala that accomplish that. But with youth comes opportunity. :)
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
1) You can be a mediocre dev and handle Java (albeit not well) but you cant handle Scala unless you have a good grounding in Computer Science.
2) The Scala community needs a standards approach rather than just a rapid agile environment. What I mean by this is that when you constantly break binary compatibility with previous releases, it makes it a tough sell to executives. Furthermore, if I go to sell using Java to a company, I can point out standards bodies and other respected business entities. With Scala, the sell is much tougher.
1) You can be a mediocre dev and handle Java (albeit not well) but you cant handle Scala unless you have a good grounding in Computer Science. Unfortunately the IT industry subsists on a large number of mediocre developers and that is just a practical reality that has to be faced. As the language matures this issue might abate due to accumulated knowledge and good API development.
2) The Scala community needs a standards approach rather than just a rapid agile environment. What I mean by this is that when you constantly break binary compatibility with previous releases, it makes it a tough sell to executives. Furthermore, if I go to sell using Java to a company, I can point out standards bodies and other respected business entities. With Scala, the sell is much tougher.
3) The reason for my post, is that Scala needs a viable SOA platform.
Lets take some well known frameworks in Scala and look at them from a business point of view. Now I know there are actual businesses using Scala and that is beside the point. Early adopters have to be set aside in this debate and we have to tackle the concept of getting Scala into well established businesses and that has a lot more to do with business than code.
Lift: Great for development of web apps if you already know Scala. Horrid, if you are a newbie. Beyond that it needs more to be viable for business.
Play Framework: Again, great for development of Web Apps and easier to use than Lift but still missing a lot of things a business needs.
So if we were to develop a perfect business SOA platform with pure Scala, what would it look like? What would be the essential features. This is the brainstorm that I wanted to bring you all in on. If I think about J2EE platforms (Glassfish, JBoss as well as the standards under them) I am driven down some paths of thought.
1) The platform has to have an API to work with that accommodates medium and low skilled developers. If you MUST be an A player to even use it, it wont work in business. You may need to be an A player to extend it, but development should be a snap.
2) The platform cannot be purely web focused. Although web apps are a big part of modern business, any business with a sufficiently complicated domain needs much much more. Lift and Play do web well, but not other things.
3) The platform can probably do without the features of IIOP and CORBA. Interoperability with those two old technologies can be accomplished much better through the use of SOAP and REST services.
4) Yes, we have to do SOAP. RESTful is great for small things but when the domain models get complicated soap is a necessity. There is little point screaming about it. Also if the platform can't talk SOAP, it can't interoperate with existing Business applications and that is a deal breaker.
5) The platform has to be standards based. Although one can be implemented in scala without doing a waterfall standards approach, the standards should be developed in an agile manner so that there is the possibility of more than one vendor in the space. Businesses hate being locked into only one platform without competition.
6) The platform has to define better separation of business logic and presentation than all prior platforms to give it a great selling point. The promise of true UI / Service separation should be finally realized. This is an odd thought perhaps but what if the platform didn't do web at all, it didn't do templates (groovy, scala or otherwise), didn't do anything except the back end SOA. If we freed the platform from all of those issues, then true separation could happen. Bear with me here:
Lets say we were developing a big product with a big back end and some Administration console with a customer UI; the amazon model (aka the E-Superstore). We have a UI for customers, also for shipping and administration of products and so on. So we propose our new ScalaSOA as the main bus for this system and the business asks us how the UI will be built. We reply that it will be AJAX based, served on an Apache Web Server. The only involvement ScalaSOA would have is to serve JSON or XML documents to the front end UI. Everything else is handled with static HTML, AJAX or similar mechanisms. Our users will then have a rich front end that can be built by UI designers and graphic artists and they let the devs know what data they need.
7) The platform would have to implement concepts of clustering, componetized deployments (think EAR files without all of the annoyances of EARs) and so on.
8) The platform would be able to reload classes at runtime enabling the developer to change apps on the fly such as is possible in play framework.
9) The platform would be componetized and designed to be extended. With the evolution of J2EE, they had to massively retool the various platforms to comply with standards. Each standard should, instead, be designed to be a component that can be mixed and matched. The vendor develops the backbone bus and can even drop in components for other vendors. Something akin to the OSGI model of providing services. Think of this in the context of an EAR deployment. If there is a standard for SSA (Scala Service Archive) of 1.0 version and it gets updated with 1.1, the old 1.0s should still work if the SOA Platform possesses the component to load the old style. The new one may have more features but the old will still work.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
1) You can be a mediocre dev and handle Java (albeit not well) but you cant handle Scala unless you have a good grounding in Computer Science. Unfortunately the IT industry subsists on a large number of mediocre developers and that is just a practical reality that has to be faced. As the language matures this issue might abate due to accumulated knowledge and good API development.
Scala allows you to do more than Java, to tackle problems you wouldn't have otherwise considered. Many people discovered this fact and publicised their solutions. Similarly, simple things are SO simple that it's not even worth talking about them - the potential for describing a simple "Hello, World!" in Scala is non-existent, there's no need to explain what a class is, why you use static, etc. etc.Which means that the base of publicly visible Scala code on the net is heavily skewed towards "advanced" examples. This is absolutely not representative of day-to-day usage of the language.
2) The Scala community needs a standards approach rather than just a rapid agile environment. What I mean by this is that when you constantly break binary compatibility with previous releases, it makes it a tough sell to executives. Furthermore, if I go to sell using Java to a company, I can point out standards bodies and other respected business entities. With Scala, the sell is much tougher.
We have Typesafe, they're taking binary compatibility VERY seriously. They offer support contracts. Exactly what standards do you feel are lacking?3) The reason for my post, is that Scala needs a viable SOA platform.
No, it doesn't. Though it would certainly benefit from *libraries* to support SOA features for some users. But not a "platform" or "framework". Spring went down that route, it became a monolith and cause a lot of unhappy lock-in.
3) The platform can probably do without the features of IIOP and CORBA. Interoperability with those two old technologies can be accomplished much better through the use of SOAP and REST services.
REST can cover everything, except for interop with legacy systems. Any SOAP library on the JVM should be fit for purpose.
4) Yes, we have to do SOAP. RESTful is great for small things but when the domain models get complicated soap is a necessity. There is little point screaming about it. Also if the platform can't talk SOAP, it can't interoperate with existing Business applications and that is a deal breaker.
"If you can't talk SOAP then you can't interact with other SOAP apps". This is a truism, but it doesn't really cover any inherent benefit of SOAP (unless you class its use in legacy systems as an advantage)
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
Platform is perhaps a bad choice of words on my part. An interesting point was made earlier about the advantages of libraries over platforms. However, deploying scala on Tomcat or JBoss strikes me as using a lawn mower engine to run a Ferrari. Sure, it can be done but its far from optimal. A pure scala platform will have advantages over the large legacy monstrosities that are today's J2EE web servers.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I don't think its the language that matters. Its just common sense and who is doing the code. Nothing to do with Java or Scala.
For scala we have a few things we follow as guidelines (not rules). Some of them are:
- Its not a competition for the shortest code, if there is one then its the best readable code.
- each line must be one intent, if there is more then break it down to more lines.
In fact on Java the opposite is true. Some devs tend to make the code bigger than it is. Example some Java code tend to just make methods that returns nothing (void) and just mutates the parameters send in. This is no better than having the code in 1 big method. Refactoring it to methods that return things made the code significantly smaller and each part isolated from one another.
What I like about scala is the ability to start somewhere small and go full on. You can use existing Java library, frameworks, idioms, tools. You can even start putting scala in an existing java code base. Then on greenfields part you can use FP, play + akka. The range of scala usage is bigger, which is a plus and minus as the style varies from one case to the other.
I guess some common sense will go long way.
"Too much stuff on one line" is *not* idiomatic Scala.
I have to try so hard to write Java that is readable, so hard. It is really not straightforward.
It really bothers me then when people who have the ample blessings of Scala syntax *still* write unreadable code. Such a wasted opportunity!
IMHO the path to language popularity is built on intuitiveness and simplicity. I agree that familiarity is a major factor so is the paradigm shift but I still believe that it is going to be hard to convince the so-called "average :)" developer.
Intuitiveness and simplicity are often conflicting goals. See Rich Hickey's talk on Simple vs Easy. A concept will often
appear intuitive only because it has some sort of metaphorical connection to an everyday but fuzzy idea. I think it's muchmore important for a concept to be simple than it is for it to be intuitive.
There's nothing intuitive about "::" or ":::" or #::".
And, on a more generic note, it doesn't have to have all the possible features in the world. Hasn't it had a roadmap that looks a little kitchen-sink-esque?
Does nobody think that it's a dangerous tendency?
I'm with Rob (and Rich) here, intuitiveness and simplicity are orthogonal concepts.
They can often occur together, they can sometimes be wildly different. Just consider something like general relativity which is fairly simple in execution and has the advantage of matching real world observations, but is not at all intuitive unless you're well versed in physics.
Simplicity always wins - so long as it's actually correct :)
--
--
My perspective with regard to Erkan's comments was this. The simplicity of Java was one of the factors that gave rise (made possible) to multiple of complex pieces of software, which were previously unmanageable in C++.
For a nontrivial number of developers, unfamiliar is (perceived to be)
difficult. Even if it is not actually difficult in some objective sense,
for someone used to doing the familiar repeatedly just doing something
unfamiliar can be difficult, and perception is often reality (even more
so when the perception is about difficulty).
Let's not sell C++ too short here.
--Rex
Apologies, my words were not correct, please replace "unmanageable" with "not readily manageable". I acknowledge and agree C++ was/is wildly successful as Kevin said already. What I tried to express is my understanding of why Java became successful and especially why I believe Scala is becoming successful. Do you disagree with this hypothesis, and what is your view?
--
Hello,
My favorite example of simplicity versus intuitive:
On Sun, Feb 3, 2013 at 5:01 AM, Robert Wills <wrw...@gmail.com> wrote:
> Intuitiveness and simplicity are often conflicting goals.
You have a map and a key. If there is a value in the map for that
key, do something with it. Otherwise, do nothing. Here is a popular
simple Scala solution:
for(value <- map.get(key) { value.doSomething() }
map get key foreach {_.doSomething}
filter, map, and flatMap operations. (I'm not sure, but I think this is what it takes to be a Monad)And everything that supports these operations can be used in a for comprehension.
for (enums) yield e, where enums refers to a semicolon-separated list of enumerators. An enumerator is either a generator which introduces new variables, or it is a filter. A comprehension evaluates the body e for each binding generated by the enumerators enum and returns a sequence of these values."On Mon, Feb 4, 2013 at 2:34 AM, Kevin Wright <kev.lee...@gmail.com> wrote:
On 3 February 2013 21:59, Rex Kerr <ich...@gmail.com> wrote:On Sun, Feb 3, 2013 at 3:51 PM, Oliver Ruebenacker <cur...@gmail.com> wrote:
Hello,
My favorite example of simplicity versus intuitive:
On Sun, Feb 3, 2013 at 5:01 AM, Robert Wills <wrw...@gmail.com> wrote:
> Intuitiveness and simplicity are often conflicting goals.
You have a map and a key. If there is a value in the map for that
key, do something with it. Otherwise, do nothing. Here is a popular
simple Scala solution:
for(value <- map.get(key) { value.doSomething() }Wouldn't the idiomatic version be more likemap.get(key).foreach(_.doSomething)(use point-free style if you prefer)? Isn't this both intuitive and simple (once you understand what foreach does, which is probably not more difficult than understanding what Some and None are in a match)?
Or evenmap get key foreach {_.doSomething}Though I don't like calling *anything* idiomatic when it so clearly relies on side-effect.
All this bypasses Oliver's real point, which was that "for" and "foreach" are poor names for conditionally doing something on Option content.
I've sent that to Nils only, reposting.On Mon, Feb 4, 2013 at 3:14 PM, Nils Kilden-Pedersen <nil...@gmail.com> wrote:
On Mon, Feb 4, 2013 at 2:34 AM, Kevin Wright <kev.lee...@gmail.com> wrote:
On 3 February 2013 21:59, Rex Kerr <ich...@gmail.com> wrote:On Sun, Feb 3, 2013 at 3:51 PM, Oliver Ruebenacker <cur...@gmail.com> wrote:
Hello,
My favorite example of simplicity versus intuitive:
On Sun, Feb 3, 2013 at 5:01 AM, Robert Wills <wrw...@gmail.com> wrote:
> Intuitiveness and simplicity are often conflicting goals.
You have a map and a key. If there is a value in the map for that
key, do something with it. Otherwise, do nothing. Here is a popular
simple Scala solution:
for(value <- map.get(key) { value.doSomething() }Wouldn't the idiomatic version be more likemap.get(key).foreach(_.doSomething)(use point-free style if you prefer)? Isn't this both intuitive and simple (once you understand what foreach does, which is probably not more difficult than understanding what Some and None are in a match)?
Or evenmap get key foreach {_.doSomething}Though I don't like calling *anything* idiomatic when it so clearly relies on side-effect.
All this bypasses Oliver's real point, which was that "for" and "foreach" are poor names for conditionally doing something on Option content.Only if you read that code as a programmer, which, unfortunately, mostly only programmers do :-). Read as english sentence, it looks nice. Is it a conditional masquerading as a loop, or a loop masquerading under the ancient word "for"? But I too still have to make this mental jump, if not loop.
Someone needs to write a tutorial about this - "How I learned to stop worrying and love the for comprehension".