Java PlayFramework & Python Django GAE [closed] - java

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I already know Java, C# and C++. Now I want to start with web development and I saw that some really big sites are built with Python/C++. I like the coding style of Python, it looks really clean, but some other things like no errors before runtime is really strange.
However, I don't know what I should learn now. I started with Python but then I saw that Google App Engine also supports Java and the PlayFramework looks amazing too.
Now I am really confused. Should I go with Python or Java? I found the IDE for Python "PyCharm" really amazing for web development. Does Java have something similar, eclipse maybe?
I know that this question isn't constructive, but it will help me with my decision. What are pro and cons of both languages?

I just want to add, that if it is a requirement for you that it is compatible with GAE, then I think Django is the best choise. Playframework is of version 2.0 no longer compatible with GAE.

PyCharm is an IDE created by JetBrains. Originally, JetBrains only had one product, IntelliJ IDE (a Java IDE), and PyCharm and all the other products were spawned from that one highly successful product.
As for which language, I would suggest trying to do something small (but feature rich enough to be a holistic test) with all 3 and see which one works best for you. Language choice is a massive question, and depends on personal factors, project factors and many other besides. Therefore I won't even begin to tell you which one is best (because it would be what is best for me, in my situation).

It depends on you. What do you want more: learn new programming language or learn how to make web apps?
I just started few PLay tutorials and it's really great. PLay 2 is even more amazing than previous one. I'd like to learn Scala, so it's perfect for me, but also because of that it's not GAE compatible anymore, but come on, there are other ways to deploy apps, I'd like to try OpenShift (dunno if it's possible, I'll try it soon).
I'm also a big fan of Python, so it's naturally that I'm also looking for frameworks to build apps in that. I would say, that Django isn't the only choice. I had few tries with Django, right now I'm trying web2py. As many stated, Django has quite hard learning curve. Web2py should be better, but I don't like the 'wizzard' way of scaffolding apps.
I've used Bottle (Flask is similar) and it's great for small apps. RESTful apps are super-easy with them, so maybe it should be your starting point.
From what I've read about Python's frameworks:
Django is quite good for typical websites/CMS-like, hard to learn
web2py very interesting --- I'm in the middle of testing that, Reddit's using it?
web.py -- minimalistic, lightweight framework, you have to build webapp almost from scratch
Tornado/Twisted --- fast, async frameworks
Flask/Bottle --- very nice microframeworks. Great for REST services
I've not tried them all, but it's what I've found out during reading the web/blogs etc.
I'm looking for something like Play Framework 2.x but in Python(ideally 3) :)

Related

How to use pure Java in web applications without JavaScript knowledge? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I love Java like hell. This is not my 'native' language in work and I do Java projects from time to time after work. I have used only few technologies with Java like communication via raw sockets and Swing. Once in the past I run the Apache-Tomcat with very simple JSP generated page. Really basic stuff.
Some time ago I was interviewed to participate in more commercial Java project. It was a web-service based on browser content/application... I heard words like 'JSON', 'GWT', 'AJAX', 'XML' and I was lost in answers. ... I suggested java Applets+Swing, but they wasn't interested. I realized I have extremely limited knowledge about web technologies. I looked very bad on this interview.
If I am not a JavaScript guy, can I really do web-apps with pure Java? I mean web pages with dynamic-fancy-elements which are I think provided mostly by the JavaScript. What technologies should I get to know? Can be JavaScript generated from Java code?
I'll make this a CW answer, because the question isn't a fit for Stack Overflow's "one right answer" format.
Yes, you can write browser applications without knowing JavaScript. One way to do that is to use the Google Web Toolkit. (Amusingly, this was one of the acronyms you heard but didn't know — GWT.)
Why we need Javascript?
to reduce load on the server, by doing things like input validations before submitting the data to server.
Can all this be done without Javascript?
Yes, you can have plain HTML and do all the validation from your Java code
Is it good idea?
No its not. By doing so, you are loading the server for simple tasks such as input validations which can be easily accomplished by Javascripts.
I don't know Javascript. With ONLY Java can I get rich web-app?
Yes, GWT is google's tool which allows you to achieve the same. GWT gives you Eclipse plugins to manager the GWT web-apps and it allows you to write plain Java code (absolutely no Javascript) and in the backgroud coverts them into Javascript, so that the rich UI is created with most of the UI event handling in the browser itself.
From someone who has Java as their go too language, develops web applications and doesn't particularly like JavaScript I'd say... just learn JavaScript. Sure it's not a very nice language (IMHO) but it's absolutely essentially now-a-days. JavaScript appears just about everywhere now from JavaFX to web services (e.g. JSON) to web applications. Java has a JavaScript engine in Rhino and is getting a new one in Java 8 called Nashorn so I'd expect to see more JavaScript not less.
In direct answer to your question, yes, you could write a web application without knowing any JavaScript but before long you'll find a situation where you have to hack on some JS or debug it and then you'll kick yourself for not having learnt it from the start.
To give a short answer, Yes you can but then the Javascript will be generated for you. There are many frameworks that will generate the Javascript for you. Maybe you should look at Vaadin if you don't like writting javascript at all.
On most projects there is no need for writting javascript on scratch. 99% of time we use jQuery or plugins based on those. Maybe you should have a look at the Twitter bootstrap.

What do you use to write cross-platform client apps? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm writing a client app, quite old school, quite conservative. On Windows, I'd probably use .NET Forms, or maybe WPF, I'm not sure. On the Mac, I'd use Objective-C, Cocoa, and all that stuff. But I want this app to work on both, and I'd rather only write it once.
Should I write it in QT? I heard that when you get down to it, QT is buggy when you use it across platforms. Do I have to worry about continuity, what with Nokia's recent troubles? What does the community think about Digia?
Should I write it in Java? Newer Mac OS doesn't come with Java anymore, and Windows never has. How can I create a good setup experience like that? What about USB devices? There are some Java USB projects, but they're all Windows or Linux based, no Mac. I'm also worried about getting a native look&feel, but I guess Swing has me covered there.
Should I write it in Python? I'm worried about performance here. Also, I've written large Python apps before, and I found that Python scales poorly to large code bases, because of the lack of static analysis.
What do you write yours in?
I asked a similar question a few weeks back Building a Mac and Windows GUI Application.
With regards to "native look & feel": If you want this, don't use a cross-platform GUI library. Write the GUI layer once for each platform. You can share the core application logic. You can probably get away with using Qt or wxWidgets on Windows and Linux since requirements for look and feel are more relaxed, but it will look rather out of place on Macs.
If "native look & feel" isn't essential, I'd say go with Qt or wxWidgets and save yourself the headaches. I wouldn't worry about continuity for Qt. Its desktop framework is very mature and isn't maintained by Nokia (they maintain the mobile part). The open source community will keep it alive. Don't know how buggy it is, but what cross-platform framework doesn't have its share of bugs?
If "native look & feel" is essential, read on for languages choices for the core application logic.
Java: Don't. Swing doesn't actually provide a native look & feel. Just try and make any comprehensive GUI with it. Swing is also very painful to program in. There are plenty of alternatives to Swing, but I doubt any of them will be better than Qt. In addition, most apps will probably need to hook into the OS. Java bridging on Macs is deprecated. You'd have to use JNI for any extensions. Probably the same for Windows.
Python: That's the path I took. Python is not only cross-platform, it comes with a rich set of cross-platform libraries. Also easy to write C/C++ extensions on any OS. Downside is that it's relatively slow to start and takes more memory than a native C++ app. Trying to set up a deployable application is rather painful too. I wouldn't worry too much about performance though unless you plan on doing serious data processing.
C++: Also a good choice. It's not too hard to write a cross-platform app with C++ if you use cross-platform libraries like Qt or Boost (haven't tried, conclusions from questions and research). Also compatible with xCode, Visual Studio, etc, so it's easy to set up the project.
Being mainly a Java dev I lean heavily to java. Your concerns with java can for the most part be handled.
One I would JavaFX instead of Swing. It is still fairly new, but I have been playing it recently and it is pretty nice. You should be able to create what ever look you like, and it be pretty consistent. The other added benefit, is that they are adding Native packaging for JavaFX. It is still early, and that is not in the stable releases yet from what I understand.
No matter what you go with there will be hurdles and issues. So regardless of what I said above, you should pick whatever you are most comfortable in. Heck you could if may even be able to go the .net route and use Mono. I hear Mono works well, especially with projects built using it from the beginning.
There are number of options available to you
Java application
Web application
Use a wrapper like App Accelerator
Java Application
Writing a Java application which is platform independent would suite your need. But development wise you might face problems. Specially GUI experience.
Web Application
Web application is the right way to go but installing it and setting up a web server in local machine might be bit tricky. Moreover if you want to host the application this is the way to go.
Application Wrapper (App-Accelerator)
If you can use an application wrapper it will work in pretty much any platform - windows, mac os. A good example might be Wunderlist.

What development stack should I learn to move from ASP.NET development to Java? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
So here's the story: I currently work as a C# developer doing ASP.NET. While I like C# I don't like the overall quality of the .NET community; most of my past experiences have been that many .NET developers are totally ignorant of actual software engineering (e.g. design patterns, code separation, etc.). The Java area seems a lot better in this regard even if you do have to put up with the occasional "architecture astronaut".
My actual question is this: I can pick up the Java syntax easy enough since I already know C#. However, I've only worked with the full Microsoft stack for web development (WebForms, although I've looked a bit at MVC and I've done some Ruby on Rails demo stuff so I know MVC fairly well). If I want to learn enough marketable skills to be able to apply for junior-level Java development positions at companies, what stack should I look at? There are dozens of Java web frameworks out there; what would be the most common one used in companies? It seems that Hibernate is the default standard for persistence (I've done a little bit with NHibernate) so I'm okay with that. I've also seen several new Java web frameworks that seem interesting, but learning them won't give me a leg up in applying for a job at a company because I'm bettering they're untested in the corporate world and aimed at startups and similar like most new frameworks.
Which framework would be the most likely to be used at a typical company that I should start to learn in order to begin a transition to a better quality community?
I'd actually recommend that you start by learning straight JDBC for database access and servlets+JSP for the web front end, and using those to implement a (very) simple web app. JDBC is the API on which basically all other Java database libraries are built, and likewise for servlets. These will require the least configuration necessary to get your app running. Once you've done that, you'll have a better foundational understanding and can take a look at:
Hibernate with JPA for persistence
Spring for dependency injection
One of the many web frameworks - Spring MVC, Struts 2, JSF or Seam are all viable
Java EE components such as EJBs.
If you're looking to do this on a full-blown Java EE container, I'd recommend using Glassfish as your server. But Tomcat is simpler (just a servlet container), and might be better for starting out with the first project.
Get familiar with Apache and JSP stuffs would also be helpful in addition to the answer above.

How to port Android application to iOS platform? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm developing an Android application and I would really like to deploy it for the iPhone as well.
However, I do not know Objective-C and I think it would take an annoyingly long time to figure that and the Apple framework out.
Is there a recommended way to port an Android application to iOS? Would the best bet be to hire a freelancer?
On the run now (home time ;-) ), so my answer will be concise (sorry)
Take a look at/Google (in no particular order):
MoSync <- Compiles C++ native apps to several mobile platforms, including Android and IOS, GPL for non-commercial projects.
AirplaySDK: Similar to MoSync, mainly commercial, has some free licensing for one of the 2 environments you're after (believe that's IOS, please verify yourself). Has been used comercially by Konami, Activision etc.
OpenFrameworks (OF) - Collections of C++ 'wrapper' code which enables unified cross-platform development of Audio/Visual projects (could be used for Games etc). The Android port is beta, see Android/Eclipse/OF Installation and the Android port's GitHub repository/developer (branch 0062_Android). The iPhone-specific code is quite complete (accelerometer access, etc. etc.).
XMLVM - It allows some level of porting from Java to a native IOS executable. Not sure how far forward this project is, and you might need to implement some of their framework classes (relatively trivial if you've got good separation of your existing Java libs).
Personally, I'm looking at OpenFrameworks right now, mainly as I like the 'One API' concept and I'm avoiding Objective-C for the moment (Want to ease myself in, I'm a Java/C# dev).
Edit: Notice that since this answer was written XMLVM development has stopped. Also Codename One came out in the interim and provides a path for Java developers.
Cheers
Rich
Your best bet for X-plat is HTML 5.
You will not be able to automagically port your native code because Android and iPhone use completely different patterns for developing all aspects of "the app".
Right now I've only seen MonoTouch (now Xamarin) available for cross platform development, which allows you to develop in .NET targetting the iPhone.
I have not seen a similar product for Android, but would a .NET based conversion process be feasible? The pricing is not outrageous.

How do you make websites with Java? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
This might be a really trivial question, but I've been writing Java programs at my school and I just found out that I can create websites with Java as well.
How can I do that? Any good books/tutorials for that?
Which is better for Web development, Java or PHP?
Also, when using PHP, MySQL comes into picture and while writing Java programs for desktop, we just use File I/O, so what is better for web dev, File I/O or MySQL?
You are asking a few different questions...
How can I create websites with Java?
The simplest way to start making websites with Java is to use JSP. JSP stands for Java Server Pages, and it allows you to embed HTML in Java code files for dynamic page creation. In order to compile and serve JSPs, you will need a Servlet Container, which is basically a web server that runs Java classes. The most popular basic Servlet Container is called Tomcat, and it's provided free by The Apache Software Foundation. Follow the tutorial that cletus provided here.
Once you have Tomcat up and running, and have a basic understanding of how to deploy JSPs, you'll probably want to start creating your own JSPs. I always like IBM developerWorks tutorials. They have a JSP tutorial here that looks alright (though a bit dated).
You'll find out that there is a lot more to Java web development than JSPs, but these tutorials will get you headed in the right direction.
PHP vs. Java
This is a pretty subjective question. PHP and Java are just tools, and in the hands of a bad programmer, any tool is useless. PHP and Java both have their strengths and weaknesses, and the discussion of them is probably outside of the scope of this post. I'd say that if you already know Java, stick with Java.
File I/O vs. MySQL
MySQL is better suited for web applications, as it is designed to handle many concurrent users. You should know though that Java can use MySQL just as easily as PHP can, through JDBC, Java's database connectivity framework.
Read the tutorial on Java Web applications.
Basically Web applications are a part of the Java EE standard. A lot of people only use the Web (servlets) part with additional frameworks thrown in, most notably Spring but also Struts, Seam and others.
All you need is an IDE like IntelliJ, Eclipse or Netbeans, the JDK, the Java EE download and a servlet container like Tomcat (or a full-blown application server like Glassfish or JBoss).
Here is a Tomcat tutorial.
I'll jump in with the notorious "Do you really want to do that" answer.
It seems like your focus is on playing with Java and seeing what it can do. However, if you want to actually develop a web app, you should be aware that, although Java is used in web applications (and in serious ones), there are other technology options which might be more adequate.
Personally, I like (and use) Java for powerful, portable backend services on a server. I've never tried building websites with it, because it never seemed the most obvious ting to do. After growing tired of PHP (which I have been using for years), I lately fell in love with Django, a Python-based web framework.
The Ruby on Rails people have a number of very funny videos on youtube comparing different web technologies to RoR. Of course, these are obviously exaggerated and maybe slightly biased, but I'd say there's more than one grain of truth in each of them. The one about Java is here. ;-)
While a lot of others should be mentioned, Apache Wicket should be preferred.
Wicket doesn't just reduce lots of boilerplate code, it actually removes it entirely and you can work with excellent separation of business code and markup without mixing the two and a wide variety of other things you can read about from the website.
Also be advised, that while Java is in general very beginner friendly, getting into JavaEE, Servlets, Facelets, Eclipse integration, JSP and getting everything in Tomcat up and running is not. Certainly not the easiest way to build a website and probably way overkill for most things.
On top of that you may need to host your website yourself, because most webspace providers don't provide Servlet Containers. If you just want to check it out for fun, I would try Ruby or Python, which are much more cooler things to fiddle around with. But anyway, to provide at least something relevant to the question, here's a nice Servlet tutorial: link
Look into creating Applets if you want to make a website with Java. You most likely wont need to use anything but regular Java, unless you want something more specialized.
I'd suggest OOWeb to act as an HTTP server and a templating engine like Velocity to generate HTML. I also second Esko's suggestion of Wicket. Both solutions are considerably simpler than the average setup.

Categories