i am confused about j2ee and php [closed] - java

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 9 years ago.
Improve this question
As a developer going through web development I would like to know if J2EE or PHP is better for building web sites.
My initial thoughts were that J2EE was better because it is Java based but upon reading several articles I read that PHP might be easier and more focused with regard to web development.
On this topic I have another query, whilst looking at different articles on web design and construction I came across websites that claimed to be built in J2EE, Java and Ruby. Is J2EE the same as Java? Or is it something completely different.

First of all, there is no J2EE anymore. There is Java EE. One profile in Java EE is the web profile. So while Java EE has a bunch of complex, enterprise-level stuff in it, you just use the piece you need.
However, it isn't even like Java EE is the choice for developing web applications in Java. It is the standard, but people have enjoyed great success with open-source frameworks like Spring MVC. If you expand your scope beyond Java to all JVM languages, you have Grails (in Groovy) and Play (in Java but also in Scala) at your disposal as well. Both are extremely good.
And then there are so many other non-JVM options like Zend (PHP) as you say but also Rails, Django (Python), etc.
So to truly appreciate what's "better," you need to consider a lot of things:
Your comfort and productivity with the language
Your comfort and productivity with the "ecosystem"--i.e. accessing third-party libraries to help you with various tasks, ease of mocking and testing, boilerplate code and mundane tasks being abstracted away, ease of implementing caching and minifying web assets, etc.
Ability to find help online through a vibrant community
Your requirements. If you need to access Amazon S3 buckets, for example, and your language or third-parties libraries in that language have poor S3 support, you should avoid it. Similarly, if you need to use Neo4J as a data store but there is poor support, move on.
There is no "right" answer to this question. I would suggest the options approach described in Lean Software Development. Do some research to narrow your choices to three. Then get a site up and implement a representative feature with all three choices. The less appropriate choices for you will eliminate themselves and leave the best choice for you.
As for your last question, Java is a programming language; Java EE is an enterprise software platform utilizing the Java language and the JVM (with multiple profiles as mentioned). The Ruby part of the application you mentioned was probably utilized with JRuby, which enables you to run Ruby on the JVM via JSR 223.

this is depend on you skill or understability if you have good configuration knowledge then i suggest to you got through java j2ee. php is more easy to java

To be short and concise, If we're talking about professional development, then Java is the way to go.
If you're a hobbyist, then PHP would most probably be the right choice of yours.

Related

Choosing between Thymeleaf and Angular for a new Spring MVC project [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 Spring Boot web application and I need to make a choice about how to implement front-end.
I'm really comfortable with Thymeleaf templating framework that I used in several projects, but I'm evaluating Angular (v2) as a possible alternative.
I'm quite new to client-side MVC frameworks and I'd like to understand if there are some guidelines to decide which option is the best for a web project.
I've read a lot of posts and tutorials about this, but they all seem to describe personal opinions or to be just coding experiments...
Are there some application requirements that objectively suggest to use a client-side approach instead of a server-side implementation?
Is it possible and effective to use both the technologies together?
Thymeleaf and AngularJS are not mutually exclusive. You can certainly use them together, depending on what you are trying to accomplish. If you are all in on writing a single-page dynamic web application, Thymeleaf is probably unnecessary.
Speaking to your question about client side frameworks vs. server-side ones, I'm an Enterprise Software Engineer, so I am not creating commercial software and my priority is less about how pretty it looks (a little Bootstrap does the trick) and more about stability, browser compatibility (even with older browsers), and maintainability. I personally avoid the single page, dynamic web applications because I find the code base more difficult to manage in non-trivial applications; a large Javascript code base can be a bear, in my opinion. Building up my pages primarily on the server side provides me with better debugging capabilities (Java is going to give you a lot of compile time help that you don't get with Javascript) and easier logging. I do use javascript (mostly just jquery) on the client side, but generally my web apps are built to degrade gracefully if the user has javascript turned off. Again, these are internal, utilitarian, applications to support the business. I don't have time to write a whole thesis on the subject and there are plenty of nuances that I'm not covering, but hopefully this is useful.
If you need your web app to act more like a mobile or desktop application, then single-page dynamic web app using a framework like AngularJS is one way to go.
The choice isn't whether to use one JavaScript library or Thymeleaf, that would be an artificial constraint you created, they are both different animals. Thymeleaf is for templating, JQuery is a client side library for making dynamic pages. It would make more sense to choose between templating libraries or choosing between JavaScript libraries, but both can go nicely together.
In general, your templating should not affect your JavaScript code, some people do template their Javascript code, but IMHO this is a terrible idea. Instead use Templating to replace tag attributes in HTML, and Javascript for making your website dynamic with whatever library you choose.
I'm not sure what you mean by
client-side approah instead of a server-side implementation
But what I see nowadays are 2 different approaches, creating Microservies VS Monolith web application. If you develop your website entirely in Thymeleaf you will not make it very reusable. Netflix, Amazon, Uber etc. all create services (sometimes called micro-services) which are reused throughout the organisation via a REST API.
If you only have a website implemented in Thymeleaf it will not be possible for another application (think mobile) to access any services created by your application, whereas if you create a REST API for your app then you can keep reusing your server back-end for when you need to make a mobile app, or another web app with similar requirements.
Of course if your services are not going to be re-used this might not matter to you and you might be very proficient in doing things a certain way albeit not being the most reusable, of course we are not always creating the next Amazon. But I still believe it is good idea to follow best practices, even if its just to get better at doing things a certain way.

Webchat: Flash or Java or HTML5 or other? [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 want to start to make a chat client that runs in web browsers, upon a colleges requests. Its my first time doing something like this, so i made some research about this mostly about HTML5. I did research on the platform itself, how fast and how used it is, but my most important factor was: mobile support
I plan to develop this chat for a long while for experience because, as a coder/programmer I am still inexperienced.So i was thinking in the future as well. i have a forum community with pretty limited chat access. I want to change that as well, and as an extra include mobile support.
i researched Flash, java and HTML5, the two most obvious choice in web applications, and pretty much the new comer HTML5.
Flash is more widely used as web app(at least what i saw and found.), and its more designer oriented than programmer, but many chats are written in this, and are used. but there is no mobile support for it, to my knowledge. thats hinders my future plans.
Java, is a robust programming language, and saw a few webchats in this, but my main issue with this is performance: its much slower than flash. But at least there is mobile support, at least the android mobiles.
as for HTML5....its pretty much still a child, not all web browsers support it fully but the major ones support web socket already, except IE9. and IE9 is the most used web browser, sadly. And i cant find any support for it on mobiles yet.
And i don't know any other platforms out there in the Internet that could do the same as the above three, but i'm open.
So my question is: Which is the best platform for writing a webchat, that lest me do mobile support at a latter stage?
No, the correct answer is: Understand which method is quick to deploy, cost-effective and easy to learn. You'll need to integrate languages to make this work. HTML 5 is the latest and greatest, that's one. JAVA ~ still in demand on the Android side..learn it..
Flash is dying..don't learn that.
Windows ~ .NET..don't count this out...Microsoft is planning on coming out with a mobile platform...this is still good to learn..always learn a language that's going to give you job opportunities in the future.
You cannot write a chat in HTML 5 alone (because it operates on the client and there needs to be server code), you would need PHP or JSP for that.
I wouldn't use flash except if you are already very proficient in it because:
it needs an extra plugin
it frequently blocks or crashes some browsers
I think it is difficult to develop and I am not sure if the development software is free
So my choice would be Java Applet by default. It needs an extra plugin but it is much more stable than flash and you need it for many applications anyways but it has so much functionality that is very easy to make a chat with it.
P.S.: Java's speed is absolutely no problem for a chat. Java is maybe 10% behind C++ depending on the application but we are talking about languages like Flash or PHP so Java is not slower but it doesn't matter anyways because a chat has next to no resource requirements.
The correct answer is: it depends. You can implement such a program using many technologies. Each of these technologies have different characteristics and pros and cons but you have mentioned that this is going to be made for a university task. This way i recommend you to choose HTML5, this is a quite new technology, i think it worths it to have a little experience in that!
If you want to have the least work with this project, you should use java.
This is MY opinion.
You should have a look at nodejs:
http://nodejs.org/
Also the socket.io module for nodejs which allows you to use websockets as a transport mechanism for capable browsers and provides fallback methods for older browsers:
http://socket.io/
There's a node and socket.io chat tutorial which might be helpful and a working chat demo based on node (though I couldn't see any reference to socket.io when I reviewed the code).
I would not discount using Flash. It is still an industry standard in web development. It is way faster than a Java applet, but you are right, Java is not going anywhere. Flash allows you to deploy your project to the web, stand alone application on Mac and PC, and on mobile.

Java for Software Developers [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 am a .NET developer (and have been for a while now). I work for an organization that was just recently acquired by a larger company whose primary development language is Java. There are a few .NET developers, but the ratio of .NET to Java has decreased substantially now that the teams have merged.
That being said, I've decided it would be best for me to start Java development. However, most of the books I've seen so far for "learning Java" all take a very basic approach (what is a class, OOP principles, etc etc). I am comfortable with this part of development and don't need a primer (unless there are differences so profound that someone recommends the fundamentals from a Java perspective...).
Anyway, I'm looking for a book recommendation for Java development from a software developer's perspective that discusses today's techniques. For example, MVC architecture, application best practices (I am a web developer, this includes web services), is it worthwhile to work with JSPs or consider Ruby instead, etc etc.
A HUGE bonus would be "learning through doing". Something like Murachs, where I can step through a project from start to finish, and is light enough on fundamentals that I don't get bored. I'm hoping to walk away with enough basic knowledge to volunteer for some internal projects and grow from there.
I'm sorry if my question is needlessly broad, but I'm struggling to find a starting point aside from my Eclipse installation (I am doing this on Ubuntu, deliberately avoiding Windows).
Thanks for any direction or insight you can offer.
EDIT - After discussing with a co-worker, and reading Bert's great suggestion (all of them have been excellent, thank you all very much), it turns out the main focus is on EE, and Glassfish. They use NetBeans for development, since it is tightly bound to Glassfish.
This doesn't mean much to me, except that I think the parallel drawn is IIS/Web apps to Win32 apps. But perhaps it will help clarify some of the more open-ended questions in my OP.
Effective Java By Josh Bloch
It may not be "learning by doing" but it gets into the details of how to use the Java language effectively.
I would then complement it with Java Puzzlers by Josh Bloch and Neal Gafter
My best bet is to learn Spring based on your requirements:
MVC architecture, application best
practices (I am a web developer, this
includes web services), is it
worthwhile to work with JSPs or
consider Ruby instead, etc etc.
You can start by visiting SpringSource at http://www.springsource.org/
There are a few points I would like to make to you:
The basic Java language is rather small and C-ish. To my understanding C# and Java works almost identically here.
The Java runtime library is VERY, VERY BIG, and rather unlike C#. Very few people know all of the Java 6 runtime library well.
There are several IDE's in common use for Java. You will want to learn the one used by the rest of the team.
I would suggest having a brisk walk through the Oracle Java Tutorial, just to get the hang of the spirit and do some of the exercises, and then look at the common "Java for C# programmer" cheat sheets on the internet. Then do a lot of code, and then read Effective Java.
(For those who think they know Java 6 runtime well, please consider if you are familiar with RMI, the Rhino Javascript engine, and XPath in the XSLT implementation and all the rest)
Please look at the following thread:
https://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far
Ruby makes no sense unless you're writing JRuby on the JVM.
If you're writing web apps, you'll need to know JSPs written using JSTL (JSP standard tag library), servlets, HTML, CSS, and JavaScript. Download Tomcat from Apache - it's a servlet/JSP engine that will let you deploy web apps locally for learning. It has an HTTP listener built in, so you don't need IIS or Apache.
You'll need to know how to create and deploy a web archive (WAR) file. That's a ZIP file that contains the standard format for a web application.
I'd have a look at the Tomcat "first web app" docs to get a feel for it.
Once you have that, come back and talk about frameworks. (When you do, I'll recommend Spring.)
Here are some references I like. I'm sure there are better, but there are the ones I have read and can vouch for:
Java in a Nutshell is a classic summary of the core language. If you need more, there are books like Java for Programmers for programmers transitioning to Java (I have not read it).
Sun's Core Servlets and JavaServer Pages was a good book for Java servlets and JSPs. But consider that a lot of web tech is built on top of this (e.g. Spring), so this may be giving you foundation but not direct knowledge of the specific framework you will be using. Also a lot of web tech these days are client-side/JavaScript/AJAX-based, e.g. jQuery.
As for MVC, consider focusing on MVP instead. I been playing around with Google Web Toolkit to leverage my Java background to create client-side apps, but it is also a good way to get some idea of MVP - read Large scale application development and MVP Part I and Part II, and the GWT MVP Development with Activities and Places. However, GWT keeps evolving.
My last suggestion is that you narrow your focus - try to figure out what frameworks are popular at work and decide if you want to focus on a tier: front (e.g. HTML/CSS/jQuery), middle (e.g. Spring), or back-end (e.g. Hibernate). Once you figure this out, then post a more specific question(s) (e.g. what are the best resources for learning XYZ).
Just from my experiences with java (limited but I took a Web Dev course teaching JSP's) Any decent technology for it is usually 3rd party. However, from what I can tell when doing web dev I would use Netbeans, Netbeans has Tomcat built in especially in Ubuntu for easy debugging.
More on similar lines you can find answers from this post
https://stackoverflow.com/questions/3820437/life-after-head-first-java/3820449#3820449
The Java landscape is quite wide as you probably have already figured out.
There are hundreds of frameworks and tools that can be used for basically doing the same thing. To get an idea, you can take a look at this presentation written by Matt Raible, where he compares a number of Java web frameworks.
As someone else suggested, you should definitively take a look at the Spring Framework. It is widely used in the enterprise world. There are several good books about Spring.
If you want to get the basics of Spring MVC in a "tutorialized" style, you can take a look at this book. It doesn't cover the latest Spring version (3.0) and it is not a "perfect" book, but it should allow you to get the basics while running some examples.
Also, there are literally thousand of Spring-MVC tutorials on the web.
For instance, you can take a look at:
http://www.adobocode.com/spring/a-spring-web-mvc-tutorial
RESTful services are also quite popular these days. I have been working with the Resteasy framework from JBoss and I found it very easy to setup and work with. This book explains the REST architecture and uses Resteasy as framework for the examples.
I also recommended "Head First Design Patterns" from O'Reilly. It covers the most important patterns using Java and it will help you to see how the language can be used for patterns you may be already familiar with.
One more suggestion: you may considering "tuning in" on Java TV. It's a great resource with hundreds of Java tutorial videos. It covers a wide spectrum of technologies so you should be able to find something for you.

Is there a chatbot framework available? [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 am trying to create an program similar to ELIZA. My preference is to implement this project in a general language such as ruby, java, C++.
is there some framework (open source would be great) available for any of these languages ?
I'm answering an old question here mainly thanks to the renewed interest in chatbots after Facebook's announcement at F8 2016. Here're few platforms that you can use to create chatbots:
Pandora Bots
Api.ai
The above two use natural language processing and advanced AI to create chatbots. You can use the above in conjunction with platforms that allow you to create bots across various messaging platforms. This way you can write your bot logic once and deploy it across different messaging platforms (FB Messenger, Slack, WeChat, Skype etc). To achieve this, you can use:
Microsoft Bot Framework
Twilio
Gupshup
Disclaimer: I work for Gupshup.
At the heart of a chat bot there is a natural language processor (NLP), the engine implements algorithms that would break a sentence entered by a human (e.g plain English) to a series of token the computer can process.
while I am not familiar with a chat bot framework there are several open source NLP engines you can utilize to implement a chat bot:
for example Open NLP
googling for "natural language processor" will point you to other sources
To my mind, the most simple way to work on bots actually is to use gaelyk, a groovy framework to develop applications on top of google app engine.
Indeed, using google app engine, you gain a quite easy to use server environment, complete with high load support.
And gaelyk provides some very cool improvements over google app engine jabber handling.
Even better, you replace Java language with Groovy, which is more or less compatible, but with very nice enhancements.
Check this bot framework named JBuddy Bot Framework
A framework for a chatbot... no. A chatbot is a serious field, requiring teams of computer scientists many years to develop. There is no frame that can help besides the general purpose ones that come with them (the string libraries would be a great place to start).
There are plenty of frameworks available for IRC-bots, but not specificly a chat-bot. Ruby has a great resource for quickly finding popular libraries/frameworks Ruby-toolbox.com
If you want something that is MVC-based I can recommend Autumn. If you want something a little more lightweight take a look at Isaac or Cinch. I've worked with all libraries before and work as expected.

Would you recommend Java/Glassfish/Metro for brand-new project? [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 9 years ago.
Improve this question
I developed in ASP.NET 2.0 for some time, and for slightly less time in Java/Spring/Hibernate. Right now I start developing new web-service and am confused with the choice of:
.NET WCF 3.5 versus Java/Metro.
From one side, WCF seems like a brilliantly developed solution, a masterpiece of software frameworks, with all the support for functional languages, easy wizards, simple architecture. The downside is that it seems to be running on Windows only (Mono doesn't support WCF) and doesn't integrate so beautifully with Ruby on Rails (through JRuby as Java does).
And Java seems really outdated -- no operator overloading or generic arrays?!
So, my main question is: would anyone here start a new project using Java or is it just a dying language for legacy software?
PS. Both performance and database connectivity are major priorities so that leaves slow Perl, Ruby, or Python and database-unfriendly C++ out of the question.
PPS. For presentation layer I'm using Ruby on Rails.
If you are building a Rails application, JRuby on Glassfish is a winning combination. I have five Rails apps deployed to Glassfish and I haven't had any problems so far. I have been impressed with the performance and deployment was super easy.
Lots of activity in the Java world. I talk to many customers deploying new projects in Java. I also see lots of activity in JRuby and other dynamic languages. Take a look at the Tiobe Index for a more :
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
As for Metro, on GlassFish, you can call Java libraries from dynamic languages (and vice-versa), so Project Metro with Java, JRuby, etc, is an option.
John Clingan,
GlassFish Group Product Manager
your observation is quite biased i think. the main thing is need. do you require generic arrays for everything or you can do all the thing efficiently without the help of generic arrays ... :) and Java is not outdated .. it is actually a GIANT . a v. big GIANT . it depends on your project how you are going to do it manage it and what services you are going to run as you yourself said abt the ROR . give a shot on Java you will surely live in it :)
I would guess that both suggestions fit your needs equally good. So when you are more familiar with the .NET tools and libraries you should stick to that since there is not much value in learning two things that do (about) the same. Specially when those things are as complex.

Categories