What is your way to do GAE Apps using Clojure? - google-app-engine

I want to develop apps on GAE using Clojure with Compojure, using either Eclipse or Idea, emacs is not a bad idea :P
So which are the best ways to do this? I don't think that I want to use leiningen because I believe that maven can be very strong if you pass the learning curve - I read this blog http://compojureongae.posterous.com/tag/googleappengine which 'till now is one of the best source of information.
If you will have to do this, what will be your approach? Or what will you recommend me?
Is this plugin -> http://code.google.com/p/maven-gae-plugin/ ok? because if I use that plugin I can include in the pom.xml the clojure.jar and basically I'm ready to go, right? Is something similar for IntelliJ IDEA?
Any other suggestions?
And which is your way to do this?

There recently was an announcement on the Clojure mailing list of a library called appengine-magic which tries to abstract away the boilerplate related to GAE:
http://github.com/gcv/appengine-magic
http://osdir.com/ml/clojure/2010-09/msg00942.html

Just a some links. I think if you really want that combination you have to do some stoff your self but this should help.
Compojure on GAE http://compojureongae.posterous.com/
Clojure on GAE http://www.hackers-with-attitude.com/

Related

Can I reuse/call existing API in Selenium-Java Framework into the Protractor Framework?

Please bear with me if this is a silly question. But thought of getting an idea.
We have a very sophisticated Selenium Webdriver-Java framework. But now some parts of our application is being implemented in AngularJS. We would like to use protractor for test automation. But we have some API in the existing framework which we would like to reuse. Is there a possibility to do so or do we need to re-write all the existing API in protractor?
Thanks
Not probably the answer you are looking for. But, this can give you some hope.
Unfortunately there is no protractor java port at this moment. I use Selenium C# and my project started using some Angular recently. And, fortunately, there is a Protractor-net project done by some great people to accomplish same thing you are struggling with. I must say, if your project is big enough to leverage some time to write a java port for protractor you can follow this project easily. It's not that extensive. I am personally using it and started writing about this on my blog
Some one is trying to develop jProtractor - An angular/protractor implementation for Java Selenium API. https://github.com/caarlos0/jProtractor
This is still under development(not in a position to use yet), but this could be the right tool for people who are in similar situation as me.

Blog on Google App Engine for Java

I am considering to add a Blog on my GAE/J application and wondered what is the best way to do so.
Are there any implementations I can use?
Should I write something on my own?
I read about Microblog but it is written in python, I am not sure it will co-exists with my Java app.
Appreciate your thoughts.
While I don't know any implementations that you can use, this question is very broad and there are a lot of different things that you could do, and writing your own is one of them.
Just to begin with you could use the Blogger API to read the posts and present them in your app. By doing that you're able to add/modify/delete posts using the Blogger's UI and in your own app you will only present the posts. The only problem with this solution is regarding the comments, where you could implement your own (just to start somewhere) or include maybe the Facebook's Comments Box.
I did exactly that for the kiebdoj.com/blog/ and it saved me a lot of time for not implementing my own WYSIWYG editor or a post manager. That was written in Python, so I can't provide any examples, but in either case it wasn't written to work on it's own.

gae-boilerplate documentation

In my search for a good social login package for App Engine, I am giving gae-boilerplate a try. But I find there is no documentation except the readme file, which I think it is not enough at all.
I have many questions, among them:
Should the boilerplate be used as a library or download and modify as needed?
How should the boilerplate be updated?
What does each model do?
Where should my templates go?
Should I have a different routes file?
Should I derive my Handlers from BaseHandler?
In general, what things should I implement in my pages? For example, I found out that I have to include a csrf_token in all POST requests. It would have been nice to know this in advance, and the many other things that I'm having to find out along the way, and which I implement without being sure if I'm supposed to be doing that.
And some more...
My biggest problem is that Social login is not working, and I feel this boilerplate is a big monster with which I don't know where to start. To make things worse, it is hard to debug social auth from any machine that is not the production one. Thats why I'm desperately looking for some docs.
I have not found anything in SO, and I guess there must be more people in my situation. So, any pointers to documentation that could help to understand gae-boilerplate a little bit better would be very appreciated.
EDIT: I switched to gae-boilerplate in a site that I had previously working. Maybe most of my problems come from the way that I have tried to integrate gae-boilerplate and my existing site. As a result I have tried to treat gae-boilerplate as a library, and keep my own templates, handlers, static files and such.
Thank you guys!
EDIT 2: After trying other options, I have to say that I am very happy with gae-simpleauth. It works really well, and Alex's support is superb.
I will try to answer most of your questions below:
Should the boilerplate be used as a library or download and modify as needed?
You can modify it as needed based on your specific requirements.
How should the boilerplate be updated?
What do you mean?
What does each model do?
User and SocialUser are pretty self explanatory. LogVisit and LogEmail are used for auditing purposes.
Where should my templates go?
In the templates directory
Should I have a different routes file?
No, you can use the existing file for all your routes.
Should I derive my Handlers from BaseHandler?
It't not mandatory but I would recommend to do so. BaseHandler is very handy and provides a lot of good stuff.
In general, what things should I implement in my pages?
What exactly do you mean?
In general, you can use gae-boilerplate as a reference on top of which you will built your own project. Study the code step by step, try to figure out what is the purpose of each file and library used and how they work together. This way you will gain good knowledge of a lot of things like jinja templating, oauth2, etc.
Hope this helps.

What are the prerequisites in learning google app engine for java?

i want to try learning GAEJ but i dont know where to start.. do i need to start learning java first? then xml and then proceed to GAEJ? or go straight for GAEJ w/o learning java and xml? any suggestion would be appreciated...
It depends on what you are doing. You actually don't need to know any Java at all to host an application on GAE. HTML and the Eclipse Plugin are good enough.
If you want to do more complex things, though such as using the Datastore or User Authentication, then I suggest learning Java. You can try to use GAE as an outlet to learn Java, i.e. learn them simultaneously.
I don't know if you've seen Google's getting started documentation yet, but it's got a great DIY tutorial for getting an app up and running.
You are going to be at a bit of a disadvantage if you don't know Java yet, but that's no reason not to dive right in to GAEJ -- just make sure you have the Java API handy to look things up as you go.

GWT+UIBinder+Gin+Guice+JDO+GAE example

I'm trying to link all this technologies, but there are many isolated examples and I do not have enough experience to link them together
so my questions:
Whether there is a similar example?
Is it possible to use UIBinder with Gin?
Any recommendations to implement it?
The GWT blueprint that we use and works great for us.
http://sonymathew.blogspot.com/2010/01/gwt-jee-blueprint.html
My own project is in an early phase, but it has all these technologies. You may want to take a look:
http://code.google.com/p/puzzlebazar/
Unfortunately, I don't know of such tutorials (a possible solution would be to get a book on GWT, but I don't know if there are any that deal with GWT 2.0 and Gin) - I'm afraid it's up to you to patch the knowledge from them together, that's what everyone has to do, right? ;) If you have some specific problems feel free to post a question about it, then we could help.
As for the UiBinder + Gin issue - I'm using both technologies and it's a breeze, but that's mainly because I'm also following the MVP (Model View Presenter) architecture/model - that way the view doesn't really has any dependencies and the Presenter does all the work. More on that here: http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html
Here is a nice tutorial. The app is very simple but demonstrates all the basics you need.
http://reminiscential.wordpress.com/2010/03/01/building-a-gaegwt-application-using-the-best-practices-index/

Resources