So ClojureScript One is rather incredible looking! You can make updates with your REPL in real time to a SPA.
So something like this is rather impossible in Java where you don't have a REPL but it seems very possible in something like Groovy or Scala. I'm sort of a Lisp bigot (I really shouldn't be but oh well) and wondering if there is a Scala or Groovy like Clojurescript?
Update:
In theory it looks like one could wrap Scala/Groovy around Java's ItsNat. However I have some doubts about that project given it hasn't been updated since 2011 (also they have they ugliest website.. its like they tried to make it ugly). The license is also rather restrictive.
Try http://www.scala-js.org/ a A Scala to JavaScript compiler
There's js-scala, but it seems to be quite experimental at the moment.
ItsNat has come to quit a stable stage, this is why it is inactive. Of course new features and more browser support and testing can be leveraged, but so far, we've had a great experience with ItsNat. We've been with ItsNat since version 0.7 and had very (2) issues, that too, quite rare ones.
If you'd like working examples, I'd be glad to show you as our project is open sourced :-)
Works well with both SEO and SPI.
Demo
If you are looking for SPA scala-gwt. Or you are looking for scala-to-javascript compiler?
Related
I've been asked to make some changes to a site that was built with Expression Engine 1.6.8. Even though I'm not familiar with this CMS, I can find my way around to make the updates, except I'm not sure about adding a contact form. I'm guessing that ultimately I'll have to upgrade this version to the newest (2.7, I believe?) in order to get the tags found on this page to work: http://ellislab.com/expressionengine/user-guide/modules/email/contact_form.html?
My only hesitation in making the upgrade is my unfamiliarity with EE, and the fact that someone else is probably creating a brand new website for the one I'm working on, and very likely without EE (so I'm learning something that I may not need again).
Any suggestions for a quick fix, or should I just bite the bullet, upgrade, and use what I've found?
Take a look at the EE 1.x docs.
At a glance it appears that syntax has changed little bit. Maybe that's why your EE2 tags were not working in EE1.
I would definitely try to use the tags as shown in the EE1 docs if this site is that old. Making a jump from 1.6.8 to 2.7 can become treacherous due to variables such as how the templates were coded, which add-ons were used, if those add-ons are even available any longer, what functionality was deprecated or absorbed, etc...
I only say ditch the efforts because you mentioned having another site in progress. If you would like to work through the updates/upgrades, follow the docs here and here and learn it. It is definitely worth the learn. Once you tap into EE, it's hard to roll back.
I ended up writing my own html code within the template and processed it with a php script to send the form input to an email address, just as I normally would on a website. Not being familiar with ExpressionEngine, I don't think I understood why I was continually being referenced to use a module in order to do this, but I suppose for anyone who is not a coder but is experienced with EE, that would be the way to go. From what I understand, the email module is not free and does not come with the core version, which is what I had to work with, but comes with the licensed version, which made this all the more confusing.
I've just started getting into Catalyst, and I've been finding it really helpful. One of my favorite things about it was TTSite in that it got me going fast and gave me something to develop with without just black text (and it required no work from me to setup). However, I've been reading in a lot of places that it's buggy, or even deprecated as mentioned here on the actual Catalyst tutorial. However I've found it nothing but helpful and have had no issues, so basically I'm wondering is there reason for me to be worried and not use it? And if so, does anyone know of a similar alternative that kind of gives you a base template set up to work within? Thanks a lot!
I don't think TTSite is officially deprecated in terms of support .. it is still included in the Catalyst::View::TT distribution as of 0.39 (released 10-April 2012). I suspect it is more a case of some developers disliking the base templates that are provided and TTSite no longer being recommended as part of the default Catalyst tutorial.
TTSite provides a very simple base that has some quirks. For example, the context object is called Catalyst instead of c, and the use of TT's WRAPPER command can get in the way of AJAX and non-html views.
More background reading:
Discussion on the Catalyst-Dev mailing list regarding changing the Catalyst tutorial from TTSite to straight TT
Catalyst wiki: disabling TT wrapper for AJAX requests
A blog post on TTSite including changing Catalyst context reference to c
A modern base theme would probably start with something like Bootstrap or one of the 960 Grid HTML/CSS frameworks. I'm not aware of an actively maintained Catalyst::View helper that would be a better replacement for TTSite, but also don't find it too onerous to drop in the latest version of Bootstrap :)
I am working on writing an IDE for Scala and need some help. I would like to implement coding assistance so that I could present a list of options when a user presses a period (".") or a space (" "). e.g. if projects is a List, as soon as user types "projects." or "projects ", I would like to show all methods of scala.List that he could use (regular IDE stuff). I know that scala.tools.nsc.interactive package provides this capability, but I am unable to figure out how to do it. Besides, it seems that the interactive package would use REPL and would be slow for this purpose. Is that a fair assumption, and if yes, are there any alternatives?
Also, is there a way I could get a call reference tree for a literal/ method (where all is the method referred to in a code base) ?
Thanks and Best regards
Aishwarya
Well, your best bet is going through the same set of links I provided in answer to this question, even though the questions are different.
Yes, the presentation compiler under scala.tools.nsc.interactive is where the reusable functionality would be.
The presentation compiler is used by Eclipse and ENSIME. May be ENSIME itself which in addition to providing emacs support also provides a server as a backend for an editor would be a good avenue.
The presentation compiler is not slow. It was designed from the ground up to provide good performance for Eclipse and it has largely delivered on this goal.
For some of the presentation compiler capabilities, see scala.tools.nsc.interactive.CompilerControl.
For another project using ENSIME, look at Daniel Spiewak's plugin for jEdit.
I have to choose a sizable (but not too sizable!) project for my next & last term in university. I thought maybe a nice IDE for scala is what the world might need right now :).
Would you like to see an IDE specifically made for scala? Or are you more comfortable using (the already available) plugins for popular (mainly java) IDEs & editors?
What do you think about the whole idea?
P.s. I'd make it open source & would add features one by one, so if it doesn't end in one semester, it won't be a problem from the university perspective.
Actually, not anymore. IntelliJ, Netbeans and Eclipse all have Scala-specific efforts that have more man-hours in it than you could possible start to begin putting in at a last term. And there's two very interesting efforts that were results of projects like that, both of which were made to contribute to any IDE effort: ENSIME and Scala Refactoring.
And, beyond these efforts, most programming editors, such as jEdit or TextMate, also have some Scala support to one degree or another.
So, really, contributing to one of these projects might be a good idea, but making a Scala IDE is not.
For his Masters thesis, Mirko Stocker contributed the refactoring functionality to the Eclipse Scala plugin, see:
http://misto.ch/scala-refactoring-talk-at-scala-days-2010/
Instead of creating an IDE from scratch, why not contribute a major piece of functionality to the Eclipse plugin, all contributions are welcome. For ideas, see tickets.
Or instead of reinventing the wheel.. you can contribute..
http://wiki.netbeans.org/Scala
But I am not sure if it will be somehow enough for your university work. At the same time, as you see, those plug-ins still require a lot of work.
While writing your own IDE you will just trying to solve problems that were already solved and tested. Besides, even if - what kind of IDE is that, which allows you to do
Scala (even if its great) only. So just for simple xml edit of ant file or whatever you will need another tool.
I think Brian Clapper already summed it up nicely.
I'd suggest something like CheckStyle but for Scala might go down well and be reasonable to tackle as a project.
Not a Scala developer but an Eclipse plug-in would probably be a worthy senior project.
Concur. Operating systems, text editors, and IDEs...does the world really need more of them? No. But everyone wants to write one.
If you want to do something useful, as opposed to simply academic, develop an extension for an existing IDE. Eclipse, NetBeans, Komodo, etc. are all nicely extensible through plugins.
Last time I had to deal with Java was 2005 and I forgot almost everything about it since then.
Today I need to build a GUI app on the top of Java. I guess it is better to use one of Scala/Groovy/Clojure languages.
The question is: which of them is better for desktop GUI programming? My program will transform and display a series of jpeg/png files + there will be ~10 dialogs (with tons of options in each with all possible widgets).
The main requirement is compactness: I hate to write a dozen lines of code only to draw a simple frame with a button. My background in GUI is (mostly) Tcl/Tk and GTK+.
DISCLAIMER: I'm a Clojure programmer. I'm obviously biased.
Of all of those languages, I think Clojure and Groovy are probably the most compact. Scala is a curly-bracket language like Java, so it tends to take up a bit more space. However, it's nowhere near as verbose as Java is, and I think Scala is pretty awesome. I know that Scala has a swing wrapper. I've never done GUI development in Scala, so I can't really say how it feels.
I've done some swing development in Clojure, and it doesn't really take much. Using swing direct from Clojure can be tedious until you write yourself some abstractions, but altogether, swing apps are smaller than the same thing in Java because Clojure code tends to be shorter and more concise than Java code.
Clojure also has some wrappers of sorts to make swing development more Clojury. One of which is clj-swing. I've seen some code written using it, and it's pretty cool, and definitely more concise than direct interop.
Now, I don't know Groovy. I really don't know much of anything about it, but I know it's more compact than Java, so I imagine GUI development would be fairly compact as well.
I think Clojure is a safe bet. With clj-swing, or even directly using the Java GUI toolkits directly is going to be really compact compared to Java, and the ability to build abstractions over non-compact stuff with macros is definitely a huge plus. Clojure has my vote.
Scala comes with fairly complete sample applications for basic GUI elements, which you can run by typing scala scala.swing.test.UIDemo at the command line. You can browse the source code for them here.
You may also look at this document to get an idea of the design principles behind Scala's Swing wrappers.
Groovy has the Griffon framework which uses convention over configuration for building GUI apps on the JVM. It's similar to grails/rails but for a rich GUI rather than a web app.
Groovy has something called the swing builder for making GUI programming easier. Here is a piece of sample code from the groovy website, it creates a frame with a button and counts the number of times you click it:
int count = 0
new SwingBuilder().edt {
frame(title:'Frame', size:[300,300], show: true) {
borderLayout()
textlabel = label(text:"Click the button!", constraints: BL.NORTH)
button(text:'Click Me',
actionPerformed: {count++; textlabel.text = "Clicked ${count} time(s)."; println "clicked"},
constraints:BL.SOUTH)
}
}
I am currently developing an SWT application in Scala and quite like it. But I do expect Clojure would be even more compact.
I've been writing a GUI by using Clojure directly with Swing. It has worked very well indeed so far. I've also written some custom UI components in Java that have proved very easy to integrate with the Clojure part of the code base.
I also think that clj-swing looks great - possibly easier than using Swing directly if you don't have prior Swing experience.