Recomendation tech for adding web to a java application [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am new in web development world
(from microcontrollers to web is a really long path)
Having a Java software (.jar) running, it's just a background process sending/receiving info through sockets, with no interface.
I would like to make a web interface to it, and I need some guidelines, about how to confront these topics
The code:Should I keep it being .jar or it's recomendable to go into .war and deployment? other?
The html/javascript code:Edit the page with an wysiwyg editor? and/or edit the html code within IDE ? / use GWT to develop everything within java? other?
The http server: Use an Apache Server, tomcat? implementing it within java with HttpHandler? other?
The Data: Data is actually in classes, objects and some persistence with writeObject.. should I leave it that way or "web development" is compatible better with mysql or some sql? other?
Just searching for something simple and actual tools, and to avoid reinventing wheels
Experienced web developers, your advices are very welcome!

I would suggest that you embed Jetty and then add some servlets to connect your existing code.
It really works !

If this is an accurate summary
You have a (presumably) proprietory protocol exposed over a socket interface.
You desire to access the same function over HTTP, with a Browser based GUI.
Then I would approach it like this:
1). Consider whether to refactor your current code - In concept you have a "core" with a socket interface. What you need is the same "core" with an HTTP interface ... except maybe that doesn't nicely work? HTTP is effectively stateless, with request/response pairs. You might have something much cleverer with your sockets so some redesign might be needed, or maybe it just fits, or even you need to get really clever and use streaming, or Comet or something.
So first decide on an approach. Let's take the optimistic assumption that a standard HTTP model works for you. Then:
2). You may as well use the servlet API, so TomCat or WebSphere Community Edition or any readily acessible servlet engine will do. Just write a few servlets that front your "core".
3). Tools, Eclipse works. Plenty of alternatives, but favour an IDE.
4). Especially when moving to the UI part, editing HTML, or JSPs something WYSWYG is useful. Things get a bit tougher if you want to do a Javascript-based UI - there are products out there but I don't think they're as mature as things such as Eclipse for Java.

I recently learned Spring. It's a very lightweight framework, and very easy to learn and use.

Related

Which framework should I use (Grails, Java/Spring)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I would like to create the back-end framework for my website using one of the following: Groovy Grails or Java.
My main concern is scalability/performance and the app will be able to handle large sets of data, primarily read heavy.
I will be using HTML5/JavaScript/Jquery for the front end and MySql but not hibernate spring JdbcTemplate
Any info would be greatly appreciated, I am fluent with Java and Spring and have made a few small apps with Groovy/Grails.
Edit: Some more specifications: I have to use java mails
I would suggest you to go with Groovy Grails. Simple reason, which you might be aware of as you have developed Grails application, is that Grails follow Convention over Configuration which simply means less configuration (unlike Spring and Hibernate), less time, less work and more output.
Keep in mind Grails under the hood is SPRING and HIBERNATE. So whenever you write a GORM query it would be better and optimised than writing everything yourself. Expect it to be highly scalable with very good performance if you follow the best ways for your DB calls. In any case it would be very easy to write and in the long run the Grails stuff will be much more maintainable as well.
Regarding front end, you are free to use HTML5/JavaScript/jQuery in a GSP page with lots of helpful Taglibs prebuilt for you. You might design one Taglib if needed. On the other hand even if you wish may be now or later, you can even use front end frameworks like AngularJS along with RESTful services on your server.
Regarding Java mails, you can use it or any other library in Grails which you have in Java.
Regarding your fluency with Java and Spring, it is going to take some days to be fluent in Grails but once done then in next few days you will make up any lost ground.
Apologies if I am digressing a bit, I have been a great fan of Servlet's and Spring's of the world (not much of groovy/grails), but recently did a POC on a product idea and used Play/Scala (or java) combo to greatest benefits and to summarize it -
Play! keeps you on the right track, forcing you to carefully consider your memory usage, which produces first-pass code that is practically cluster ready.
So, essentially, with Play/Scala scalability/throughput is not an afterthought rather built into the way we program on it. Hope it helps.

Restful web application, Java or PHP? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm creating an Android application which will access data using a restful web application.
I have quite a lot of experience with Java, but minimal experience with PHP.
Having looked online, it is difficult to determine which language is more suitable, scalable, portable etc.
I'm hoping that the Application may one day have many concurrent users and therefore I need the most suitable option.
If anyone has any experience writing a web application in either language, I'd be really interested to hear about your experiences, and any problems you faced.. i.e. for a java web application do you need a tomcat server or another embeddded to server for it to be able to run?
Thanks, for any answers, Matt.
If you already have experience with java, I would suggest you use the following to build your REST services: http://restlet.com/
Its very easy, and efficient. The performance is very smooth. For PHP, you will have some learning curve, and also there is no standard. Mixing java with PHP is like combining a VERY STRICT LANGUAGE (java) with a VERY LENIENT LANGUAGE (PHP). So its safer to be on the same language.
Tutorials:
Official tutorials to get started: http://restlet.com/learn/tutorial/2.2/
Good step by step tutorial with screenshots and code snippets: http://java.dzone.com/articles/restlet-framework-hello-world
Short:
Take JAVA!
Always choose the language you are comfortable with. Also I think Java is better suited in the end.
PHP isn't my favorit. Most of the people like it, because it is easy to start with. (It was also for me the second (non Browser) language I touched.)
Framework Tips
WebFrontend: Play Framework
Back End&Scaleability: AKKA
JSON: Gson
Long:
Scaleability in the meaning to scale to lots of concurrent users:,
is more a architectonical issue, as a question for the right language. You can write scaleable software in any language. The difference isn't the scaleability of a language, but it could be the performance. One language will take longer for the same task as the other one. But you could always throw more Servers in, to scale out.
Architectures to consider if you want to scale out, are in my opinion message based designs. My favorite is the actor model, there is a very good framework for that in Java, the akka framework (production proved). But I think you first should get your software running. If you get enough users... scalability problems are the problems you like to have (they mean you have users).
Scaleable doesn't only mean, that you can scale to many concurrent users. But the ability, to handle the complexity of the software or can handle concurrent development and so on (your team will grow, thats also a problem to handle). In this topics Java is as clearly static typed OOP language, better suited.
Also the performance will not be as good as in Java (it is a interpreted language). But there are always options. Facebook started with PHP. In an interview one of the lead developers, told that PHP isn't that scaleable, because PHP wasn't designed for OOP. But the performance issue was handled, through writing a compiler for PHP (outputs C++). [If if find the link I will post it] .
Update the PHP Compiler is Called HipHop and it uses HHVM (Hiphop virtual machine), Facebook developed it after excessive CPU usage
You can consider looking at https://jersey.java.net/ As a web container you can use anything like Tomcat. I have used Google App Engine in the past.
To get started quickly with Java look into http://dropwizard.io/, using less EE frameworks and more standard Java.
Has Jersey for REST and is supereasy to run.

Using wavemaker for enterprise applications [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm starting a new web based enterprise application, and I'm thinking of using Wavemaker.
I'm a fairly experienced java-ee developer, but it seems to me that even in this case, WaveMaker still makes sense to develop the application fast and focus on the business logic.
My questions are :
1- Are their any drawbacks to this platform
2- Can I do all the normal things from the server side easily (like sending mail,building birt reports, adding jobs)
3- Can I freely manipulate javascript (for example for specific animations, using plugins....)
4- Can I integrate realtime processes, like websockets ?
Thank you
I've used Wavemaker in an Enterprise application with success. We used quite advanced features such as heavy use of backend logic based on JavaServices, an run-time SQL database selector made inhouse, JS plugins for the frontend, obfuscation etc
We later recruited a devteam to take support of this application and, although the community is small, the team learn quickly and was able to maintain the code base.
As I see it, Wavemaker is a excellent tool if you like to:
deploy a web-based CMS for your midsized SQL database
deploy a smaller web control page for your java back end system
To answer you questions:
1) Small community: Although the community is friendly and on their toes, it is too small to ensure the type of feeback you might be used to. You will have to spend quite some time banging your head to the wall when you try to go beyond the example applications.
2) Yes, you have all the freedom you would expect from a Java backend. Simply said; each REST api is assigned to a Java Method, its up to you to implement the logic. I have built wavemaker on SQL, mongoDB. With email interactions, data parsing, file upload/download etc You name it
3) Yes, you can add JS plugins and customize the scripts generated by Wavemaker. You might want to make sure that you don't edit the auto generated JS, since they will be overwritten. but as soon as you found the right entry point you are free to customize just the way you like it.
4) Yes, since you build you own back end in java you are free to open up any type of communication you like to have. And since you are able to customize the front end js you will be able to read this data. But as I said in question 1 - there will only be a small community helping you
So to sum it up:
I vote for Wavemaker, but make sure to only deploy it if you application will be similar to the templates/demo provided, if you build a unique system you might like to look into other solutions.
All choices have drawbacks. There is not a lot of WM expertise to be had. You'll need to deal with some issues in terms of the library at hand, dojo, spring etc instead.
you can,but it requires some java knowledge. You are operating in a spring MVC you can
you can, you are operating in a dojo client there
possible, probably. worth the effort, doubt it.
1- Drawbacks- It's enterprise focused platform, so will require own effort to learn it.
2- Yeah, you can do pretty much all normal things (at least from my experience, till now)
3- The tool has kind of open-source configuration so its easy to manipulate or customize your codes if needed
4- From my experience, WaveMaker has one of the best and most diverse integration options available.

Could you pls comment before we start our mobile+server project? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
We are a team of four CS undergrad seniors developing a mobile app (+ the web-based servicing architecture ofcourse) with the following intentions:
(1) Its our Degree Project (Thus comes, UML Modeling, Documented Testing & other specification reports)
(2) Our chance to learn & solve issues ranging from UI, data mining, AI, TO product-marketing!
At the end of the day, we wanna see many people globally, benefiting from it.
Could you please comment on the tool set we are using?
(1) Java + Eclipse + Android Plugin (ADT) & SDK (to start with)
(2) Various web-services SDKs
(3) On the server: ?? (dunno yet)
(4) For other artifacts: IBM Rational Modeler
any resources you think shall be better/helpful?
Thanks in advance!
UPDATE: We shortlisted UML/MDT extensions of Eclipse instead of IBM Rational Modeler
That seems a pretty typical setup. If you were doing this professionally, the next addition would be version control; Subversion is probably the most common.
Edit: If you're looking at the "free" price point on a Java server, Tomcat and GlassFish are the first three to mind, I think JBoss also offered a free/evaluation copy.
If you want a server you'd be hosting remotely, Java is one of the more expensive languages to host; PHP is probably the least expensive to host, with Apache being the most common server.
How will you manage your feature/task assignments? I would recommend Google Code if you don't mind allowing your tasks assignments to be public.
Otherwise JIRA is a good alternative (only $10) that my team has started using recently, though I have mixed thoughts about it. A different team currently administers the install so we haven't been able to customize it to our needs.
As for the technical architecture, I would need to know more about your project to make recommendations. Make sure you think about high level components and requirements before selecting technologies.
UPDATE: Without knowing exactly what you need to do on the server side, I would say a good technology to consider using is Spring Core (and possibly some of the other Spring modules). Spring will still allow you to use POJOs, but allow you to construct your application using dependency injection - which ensures your code is loosely coupled. Spring is worth learning - it promotes good programming practices and is used it many Java apps today.

What Java framework would you use with Google App Engine? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
It's been a while since I've done any website with with Java, and am wondering what framework options are out there for Google App Engine.
What framework would you suggest for someone who has no real preference?
I like Ruby On Rails, and am getting into Django, and like that as well. Professionally I'm a ASP.NET developer so I have the most experience with that, but I'm looking to expand into other technologies, and patterns.
It would be nice to have more experience with MVC.
thanks,
Mark
The Spring Framework works, although you have to make sure commons-logging isn't called commons-logging-1.1.1.jar (as I had it in maven conventions, Google provides a jar with this same name and there are classloading issues as a result). So, Spring WebMVC is confirmed to work - which raises the possibility that its sister project Spring Webflow will work - though I can't say I really like where Webflow 2 completely diverged from Webflow 1.
Also, I have yet to find a framework that really encompasses the notion of "saving and continuing" well - users often like to do that, and Webflow 2 really tries to make programming that as difficult as possible if you use its persistence context inside the flows themselves.
Wicket works on App Engine, you just have to make a few tweaks to the configuration.
I've had variable experiences with Vaadin on GAE. Some applications are almost as fast as with localhost, but sometimes the latency is freakish. Probably depends on which server geographically your application gets deployed on.
Try ItsNat, more info.
Don't use it for a simple single reason - vendor lock in.
What happens if the service doesn't meet your satisfaction?
What happens if you can get a better deal (Java hosting) somewhere else?
What if you want to sell your product - where's your platform?
What happens if Google decides App Engine is not worth their effort and close it?
as a side note Google have and will close services that are unprofitable. A simple search will reveal many, escpecially in theses trying times.
Do you care about vendor lock in?
If you don't care about losing your effort and time invested and perhaps want a platform just to play with then I suppose it's OK but for anything serious stay away.

Categories