• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Are Java, Servlets, Tomcat, Netbeans, PostgreSQL, jQuery still current?

 
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

10-5 years ago I developed a prototype website using the following freely available technologies.
- Java
- Servlets (not JSP or JEE etc)
- Tomcat
- Netbeans
- PostgreSQL
- JQuery

The prototype was good, attracted $ backing, but the idea eventually floundered because the concept was underdeveloped. I have since completed a PhD and the concept is now sound and I want to build a new prototype.

Are these technologies still current even where legacy is not a consideration? If not, what might you recommend as alternatives (within a similar paradigm).

I completed most of the Head First series (and several Murach books) in my first stint, are you able to recommend any basic text books for new developers to iron out pesky start up problems.

Any help appreciated.

Marten
 
Ranch Hand
Posts: 89
1
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just completed a Boot Camp cert in Java.

Here's what we used:

Java (of course)
Eclipse
Hibernate
MySQL
Spring (comes with Tomcat)
Postman
Thymeleaf

All free to download...

I'm still learning but other things to learn more about, for me:

Mavin
Gradle
Spring Boot


This is my two cents...hope this helps you!

P.S.

Although a bit dated, I am reading this book now....

Thinking in Java
http://ce.sharif.edu/courses/92-93/2/ce244-1/resources/root/Books/[Bruce_Eckel]_Thinking_in_Java_(4th_Edition)(BookFi.org).pdf


 
author & internet detective
Posts: 40283
819
Eclipse IDE VI Editor Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- Java  - yes
- Servlets - sorta. It's more common to use a layer on top like Spring MVC.
- Tomcat - yes
- Netbeans - as much as so as in the past. It's mostly for students. Eclipse and IntelliJ are more popular in industry
- PostgreSQL - yes
- JQuery - sorta. Pure JS frameworks are popular, but jQuery is still used too
 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll expand a bit on jQuery -- while it is still used, it is pretty much considered passé for new front-end development. If you want to stay current, most new front-ends these days are SPAs (single-page applications) using React or Vue.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Royale, Jeanne and Bear, I have contemplated your responses over the day, very helpful.

I will redevelop my original prototype from scratch as the original has a lot of cruft and loose threads. I will maintain the original architecture/approach, so I've decided on
- Java
- servlets
- Tomcat
- Eclipse
- Posgres

The use of JQuery is a more complex question as a unique feature of my design is an integrated MVC (hence I'm not using Spring).

My original design is a rich SPA, +10 types of resources where only one is visible through a tab structure (hide and show), each tab contains multiples of that type, each type with multiple unique actions, where one resource also has a rich DOM editor associated with it, all in one SPA. (months of rookie programming)

Basically the design involves the DOM being built on the server, along with matching (id and class) JQUERY script as event handlers and AJAX. Other than hiding and showing, any input made on the client side goes straight to server which generally responds by replacing part of the client's DOM after updating the model (database and sometimes xml). There are no controls (if, else while etc) on the client side. I also use JQUERY for drag and drop, resizing DOM elements (with new dimensions automatically stored on server), rich text editor, and other cool stuff using plug-ins.

So I have a remaining question over whether React or Vue can do this all too, is JQuery passe (out of fashion but sound) or becoming redundant and unsupported? I feel that JQuery is close to the DOM. When I read about React and Vue I get a sense these are more high level and removed, and work in a quite different paradigm.

thanks again to all for your thoughtful responses, I'm also looking for a text editor with mathematics capability, and repository for Eclipse, if anybody has any thoughts.



 
Royale Summers
Ranch Hand
Posts: 89
1
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suggest checking out Hibernate as it uses ORM (Object Relational Mapping).

Makes database interfacing easier.

https://youtu.be/SH29O-bcQlc

Although, it works best with Spring.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Royale, I was actually thinking about how to implement the database connection overnight, so your advice is timely.

That's a useful video, with a great diagram at ~2.29. I don't think I will use Hibernate though, as it's another framework to learn, and also because
- my objects are generally all managed, where any changes made by the client are automatically saved in the DB, with the success or otherwise of that save communicated back to the client
- I do have detached objects (as immutable versions) that are sometimes swapped using an observer pattern
- I never remove objects, but just set a delete field to true, so these fall under managed

Nevertheless, the db connection remains a problem for me that I will continue to ponder while I decide, thank-you for your engagement and propelling my thoughts, very useful.
 
Royale Summers
Ranch Hand
Posts: 89
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out: https://youtu.be/GNN-FpNucmI

Difference between JPA, EclipseLink, and Hibernate.



Hope this helps.
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

marten koomen wrote:I feel that JQuery is close to the DOM. When I read about React and Vue I get a sense these are more high level and removed, and work in a quite different paradigm.


While the paradigm is quite different, I don't see React being any less "close to the DOM". In fact, since the whole purpose of React is to manipulate the DOM via components, I might consider it even closer.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear, that's a compelling comment given that you are a respected JQuery author. I've checked a few examples and will embrace the React paradigm, I trust the learning curve will not be too big.

Are you able to recommend one or more books? I tend to learn best from ground up, I note there's no Head First for React which is unfortunate. I am floundering a bit that the HF Java Servlets hasn't been updated for Servlet 3.0.

cheers


 
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jQuery has been used as the internal front-end toolkit by many JavaServer Faces implementations. And, incidentally, JSF was still pretty new 10 years ago, but it's an integral parts of the JEE spec, even if we do have some here who don't care for it (I, on the other hand, am a long-time moderator of the JSF forum, so you can guess where my bias lies).

I don't think jQuery is as popular all by itself these days, as it's not - in my impression - a complete end-to-end solution for application development.

And speaking of end-to-end, what's more critical to think about isn't so much individual technologies as overall environment. A lot of start-ups build on one of the scripting languages - PHP, JavaScript-based systems like ReactJS or NodeJS, or python. They're seen as "productive" because you can go from concept to displayable web pages very quickly. But indications are that the total time and effort spent on a system is relatively constant regardless of the language system and toolkit used. The main difference being whether you spend most of the time and expense in getting a displayable result or in getting a reliable and secure result.

Java is an expensive platform. It's not ideal for quick-and-dirty development. For one thing, it won't let you get away with as much dirty and that reduces the quick part. A scripting platform is thus good for proof of concept. stuff that will never be put under stress (such as in-house support tools), and stuff that's likely to be abandoned if it doesn't prove itself. Java, on the other hand, has a rich and well-proven toolset, is demonstrably scalable, is built from the ground up for security (the applet debacle notwithstanding), and less likely to hit you with unpleasant surprises when you've reached the point where you're raking in billions of dollars a day. Like, say, facilitating the export of sensitive customer information to unscrupulous operators in nations that don't co-operate with your own country's law enforcement.

Some of the biggest names on the Internet have built very successful systems on non-Java platforms. And some have paid the price. They've invested themselves so heavily in languages such as Python that they've had to spend a lot of time and expense on creating tools to try and check after the fact things that Java's strong typing and encapsulation architecture would have never let pass the initial compilation. As I said, pay now, pay later. You'll still pay. It's more a matter of how patient your funding sources are.

On the other items, as others have said, it's most likely that you'd want to use a platform such as Spring MVC, JSF, or Struts (possibly - it's not a standard and JSF was designed to address its faults). Such platforms typically come with a pre-supplied primary dispatcher servlet with the actual UI and business logic done in user code. Spring is a good all-around resource, since it not only has its own web infrastructure, it can play a strong supporting role in other systems as well. I use Spring Data (JPA) for my own JSF webapps and not infrequently other Spring modules as well. Tomcat is alive and well and well-supported. In addition to being a JSF forum moderator, I am one of several who provide strong backing for the Tomcat forum here on the Ranch. Tomcat has the virtual of being not only free, open-source, and well-supported, but also it's lightweight so it can start quickly and configure easily for systems that don't need the full JEE stack. And in fact, if you only need selected JEE extra-Tomcat services like JSF and/or JPA, it's easy to link support libraries into Tomcat webapps.

NetBeans is one of the 3 major IDEs and originally it was owned by Sun (once called Forte) and was their proving ground for up-and-coming Java features. These days that's no longer true, but it is easy to use and has a large following here on the Ranch. IntelliJ is commercial software, but is well-suited for general Java application and webapp development. It also has about the only decent WYSIWYG GUI designer for Spring-based. It's also the IDE provided with the Android Studio developer's kit (having replace Eclipse for that honor). Eclipse is my poison of choice, as it's well-suited to development and testing/debugging of complex systems involving many concurrent applications in many languages.

PostgreSQL is, next to MySQL/MariaDB one of the most popular of the modern open-source DBMS's for major application systems. Of all the free databases, it's the one most like Oracle and they have traditionally supported advanced features before MySQL. At one time, MySQL didn't support transactions, but PostgreSQL did. It's not going away any time soon. And if it does, a LOT of my own applications will be left hanging.

So there you have it. I would add that knowing a good built system such as Maven, Gradle or Ant is highly recommended. As well as a testing framework such as jUnit. And loggers.

And once you're ready to base a major business off of Java technology, there's a raft of support tools like Jenkins (Continuous Integration), Nexus (Maven repository and cache server), code coverage tools, UML tools, Gantt and PERT tools, etc., etc. etc.


Also, one last comment. There's a popular myth that whoever gets to market first wins. It's not true. The Apple Newton was ahead of the Palm Pilot, and yet it wasn't nearly as successful. The pioneers of radio-telephony are not, by and large, market leaders in modern cellular products and services. Sometimes taking the time to produce a better product can be well worth it.
 
Royale Summers
Ranch Hand
Posts: 89
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim -

Thanks for taking the time to post those follow-up thoughts.  I'm just learning but Spring has different modules that I have been learning in addition to its Security Architecture built-in (https://codesjava.com/spring-security-architecture-diagram) and as I started comes included with TomCat.  So, I welcomed reading your thoughts regarding its use as part of the development lifecycle.  I'm still getting a solid understanding of the Core but I'm hoping to expend soon and have been learning and using Postman -- do you have any thoughts, opinions, etc. regarding Postman?
 
Tim Holloway
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat and Spring Framework are completely independent so unless Spring Boot is bundled with a Tomcat, they are completely separate downloads. Although Spring is very powerful just because of its standardized bean factory and injection service, the various modules which wrap and normalize popular frameworks such as scheduling, data access, security, web applications and so forth are what bumps it up to a virtually "must-have" technology.

Postman is unknown to me. In fact, it doesn't even yet have a Wikipedia article. On the surface, it sounds like it's built on JavaScript, but that's just a guess on my part.
 
Royale Summers
Ranch Hand
Posts: 89
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All -

I know in our Bootcamp, I download Spring only unless it was already on my computer but I didn't download Tomcat separately...?

I just recently learned about Postman and thought it was an interesting tool.

"Postman is a Google Chrome app for interacting with HTTP APIs. It presents you with a friendly GUI for constructing requests and reading responses. The people behind Postman also offer an add-on package called Jetpacks, which includes some automation tools and, most crucially, a Javascript testing library. This post will walk you through an example that uses those testing features. While they won’t replace your focused unit tests, they do breathe new life into testing features from outside your applications. This makes it extremely valuable for functional testers or for developers who love to test outside-in."


https://seesparkbox.com/foundry/api_testing_with_postman
 
Royale Summers
Ranch Hand
Posts: 89
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this link:

Spring Boot and Embedded Servers - Tomcat, Jetty and Undertow
https://www.springboottutorial.com/spring-boot-with-embedded-servers-tomcat-jetty

Here's an excerpt:

"For example, for a Spring Boot Application, you can generate an application jar which contains Embedded Tomcat. You can run a web application as a normal Java application!"
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim!

I agree with your sentiments completely, particularly around Java versus scripting languages like PHP.

I'm now looking to use Eclipse, Java, Tomcat/Servlets, PostGres and React, given that JQuery does seem passe. I get worried about statements like this on Reactjs.org

React will efficiently update and render just the right components when your data changes


In my first prototype I (as programmer) had complete control of how the DOM was changed using JQuery, I don't want to cede that control to a framework. But it seems React will allow me to maintain control.

I will not use Spring MVC because I have the architecture of my servlets worked out, which seems close to the Spring architecture anyway as I have a single front controller. Adopting Spring would be a new learning curve and I only have a tentative grasp of the technologies I'm using.

I am a one application programmer. and while my first prototype was a bit spectacular it was full of cruft as I was simultaneously learning the technologies. I hope to create this second prototype with sufficient clarity to hand it over to a professional team should it be acceptable. I also agree with Tim's first to market thoughts, mine is an educational application and while working in educational bureaucracies I've seen similar ideas to mine flounder due to un-managed complexity. While teaching children seems simple, it's all about principled communication and Java provides a great base for principled communication at scale.
 
Tim Holloway
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not as familiar with React as I should be. When I do 100% JavaScript apps, they're usually quick-and-dirty and NodeJS can handle that. I hold a grudge against React because for virtually the first time in my career, I had to walk away from completing a project because I got in a fight between React, a popular PHP ORM backend whose name I forget (actually, it was Laravel), and anti cross-site services and it was just not worth the work to learn all those platforms for what I was being paid for.

I don't know how much backend support React has. But if it's normally in JavaScript (or PHP), that's not where I'm at. JavaScript is a pretty awful language, PHP is still trying to become object-oriented, and neither are famous for high security. But if you want artistic front-ends with minimal coding and a solid Java backend, you could do worse than JavaServer Faces.

JSF apps are virtually 100% pure MVC architecture. The Views are laid out in template files (.xhtml), the Models are POJO JavaBeans* and best of all, the Controllers are already written and debugged for you. The View Template Language (VTL), also known as View Definition Language is xhtml with JSF-specific custom tags (you can also use JSTL, if you are careful, but I don't recommend it). The primary (core) tagsets are the HTML thin wrapper tags and the format support tags.

Using just the core tags defined in the JEE spec is convenient, because JSF automatically handles putting initial values into the controls, scooping up user input, validating it, handling data errors, and pushing valid value sets into the backing (Model) beans. When an action is fired, the action method then has immediate access to all the necessary data and knows it is correct (else the action doesn't fire). No special attributes or user-written data transfer logic needed.

It's also extensible - you can write simple classes to do custom data validations, as for email addresses.  Everything happens in a relatively simple lifecycle process.

What makes it even better is its client-side UI support. In addition to the core tagset containing JEE standard tags, there are third-party libraries like IceFaces, RichFaces, and others that bring things up to the next level. Because, face it, HTML tags are pretty stupid by themselves. These extension tags allow things like drop-down combo boxes, pick lists, spinners, sliders, tables that can be sorted and filter on the client or server sides, and more. AJAX is supported in core JSF since JSF Version 2 (which is quite mature now), and even more active client logic is on tap in the extended tag libraries.

I mentioned that jQuery supports the infrastructure for most client-side JSF activity. In most cases, in fact, it's so well integrated that developers need not actually code any jQuery directly, since the smart controls already came that way (it's largely what makes them smart!). And of course, JSF can work with traditional JavaScript just as well as raw HTML does. Although since there's often a one-to-many relationship between a JSF page element and the raw DOM elements it generates, one has to become familiar with how the low-level element IDs translate (it's pretty straightforward). And finally, JSF leaves the actual appearance of the page up to you. Everything's done with CSS, and at the hghest level, you can even use "skins" allowing the user (or you) to select a customized look for the entire site with minimal work.

Hey, I said I'm biased on the subject. You'll find brochures on the table at the left as you go out. But seriously, which it's not at all a one-size-first all solution (it's not a good ReST platform, for one), it's really great for form-based data entry and display, and it's a non-exclusive architecture, which means that if there are parts of an app that work better with custom servlets (creating PDF's and Excel spreadsheets, for example), you can mix and match technologies without them getting into fights.

My real bias is simply Java. Because there are enough trash apps crashing and leaking data out there. JSF is just one of my favorite ways to realize it on the web.

===
*"POJO JavaBeans" are like "hot water heaters" and "pizza pies".
 
Marshal
Posts: 3255
487
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:I don't know how much backend support React has.


React/Vue/Angular/etc applications typically use HTTP-based RESTful network interfaces carrying JSON or XML payloads to communicate with the backend, although messaging protocols like MQTT or a custom protocols built on top of WebSockets are used often as well.


Tim Holloway wrote:JavaScript is a pretty awful language


If you haven't already, maybe take a look at a modern version of JavaScript like ES6, or even better TypeScript, which can be transpiled-down to any version of JavaScript.  They have good support for classes, interfaces / custom types (TS only for now), decorators, arrow functions (like lambdas), moduling, improved scoping, etc.
 
Tim Holloway
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way to take an awful language and make it truly better is to break it. Because when you have a language with a wide user base like JavaScript, PHP, Python 2 or Visual Basic, there's a whole lot of code that depends on that awfulness. Indeed, we're about to leave Python 2 behind forever, but some of the original sins are still well-supported in Python 3 because the rewrite to truly clean it up would be inconceivably massive.

One of the awful things about Java, for example, is the confusion between null, empty strings, and blank strings. JavaScript compounded that awfulness with about 2 more ways to not be a string, although mercifully I cannot recall how they work at the moment.

A greater problem can be seen whenever a procedure-oriented language tries to become object-oriented as did PHP and Python. Because you have to allow backwards compatibility, the OO aspects tend to be quite fragile. PHP in particular also had the issue that unlike JDBC, each and every DBMS supported by it had its own unique protocols and functions and attempts to normalize them and integrate them into a single standard (such as PHP-Pear) have been painful.

Java has its warts, but at least it was designed from the beginning to be object-oriented (actually I prefer the term object-based when there is no escape from class architecture). And, of course, the security was also designed in from Day One. Which, as we can see from the applet incident, is no guarantee, but like the difference between the paranoid designs of the Unix-descended OS's versus the attempts to bolt on security after the fact in Windows, does tend to make things cleaner and allow fewer possible loopholes.

One sin that isn't 100% exclusive to JavaScript that is nearly unheard of - when possible at all - on other platforms is that in JavaScript you can redefine core JavaScript functions*. I worked on a project that did exactly that a decade ago and it really wrecked my attempts to use one of the popular JavaScript frameworks of the day. An even more widespread mess came about with one of the core functions used with web pages. Microsoft did a slightly off-key implementation that caused Red Hat to flatly refuse to support IE8 or earlier for its RichFaces JSF tag framework.

So you may see why I don't pick JavaScript as my go-to tool without considering the potential perils.

===
*Offhand, I believe that Smalltalk and FORTH are two others. And maybe LISP.
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

marten koomen wrote:In my first prototype I (as programmer) had complete control of how the DOM was changed using JQuery, I don't want to cede that control to a framework. But it seems React will allow me to maintain control.


You are not ceding anything. Your code (usually via JSX) tells React what you want the DOM to be, and React figures out the best way to get there, avoiding unnecessary DOM changes. You still get the DOM you want -- how to best get it there is handled for you.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear, I thought that React might actually have similar control but done through a different paradigm

On the broader issues I agree with Tim that

JavaScript is a pretty awful language


In my original prototype I generate the initial HTML and JS file on the fly for the SPA, with the client sending actions back to server (to get out of JS ASAP) and do all processing on the server (an ordered JAVA environment) which sends back an enclosed function with HTML and JS that is executed as part of the AJAX call. The prototype is still live after 5 years and while its very crufty in parts it is still quick with minimal latency.

The node.js and NPM worries me a bit now, I trust I don't have to use them. With my current set up I pull in a few JQuery libraries on the client after which only strings are exchanged between server and client. I'm hoping React will be similar. But I have $AUD200 books on order so I will find out.

Thanks all!

(In philosophical terms, Javascript is a bit like original sin, can't be scrubbed, where the different frameworks are bit like different churches    )  
 
Tim Holloway
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring does not come with Tomcat. Tomcat does include non-Tomcat components, but at last count, none of them came from Spring. Most, in fact, came from other Apache projects such as Apache Digester and BeanUtils.

Tomcat is a product of the Apache Foundation projects (apache.org). Spring is the product of the entirely independent SpringFramework.org.

Spring Boot is a Spring module that allows you to create a self-contained web application/server component so that you don't have to install and configure a webapp server like Tomcat or jetty and deploy a WAR into it before the user can use it. Instead they just run the Spring Boot module and it launches an embedded copy of the webapp server that had the application pre-deployed into it.
 
Royale Summers
Ranch Hand
Posts: 89
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim -

All I know is when I ran my app using STS, it shows Tomcat running and I didn't install it?

"Spring Boot is a framework and tool suite for developing and deploying Spring-based applications quickly and with very little configuration. It even comes with an embedded Tomcat Web server for running your applications as a standalone app!"

https://www.developer.com/java/data/developing-a-spring-boot-application-using-sts.html

I used Postman to test my API; no problems...
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is this a case of Spring comes with Tomcat components (Ron, Royale), but Tomcat does not come with Spring components (Tim)?
 
Tim Holloway
Saloon Keeper
Posts: 22779
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

marten koomen wrote:is this a case of Spring comes with Tomcat components (Ron, Royale), but Tomcat does not come with Spring components (Tim)?



I don't know, but I doubt it. Usually you have to get a product from its owner. Especially when you're dealing with something like Spring Boot, where Tomcat is just one of the possible servers it can bundle. Check the springframework.org site to be sure.
 
Royale Summers
Ranch Hand
Posts: 89
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marten -

I'm not experienced enough to give a valid response.  All I know is I ran my app and it shows Tomcat running...
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Likes 1 Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to follow up on  discussion in this thread regarding React and my subsequent engagement

I have read/browsed Full Stack React by Accomazzo et al  The Road to Learn React by Wieruch and Learning React by Chinnathambi and can report that I will be sticking with JQuery, and stick closer to vanilla Javascript wherever possible.

React has quite a different paradigm to JQuery.  React seems very application oriented, with all three books starting by creating application from scratch to create Html elements, style them etc, there seems no starting assumption with React that you have a well formed HTML Dom that you would like to do stuff with. React doesn't sidle but barges into a web application.  In contrast, JQuery assumes a DOM and is more focused on AJAX type interactions, so its a better fit for a website that has a high level of interactions with a server and other elements, and for applications where you have a strong sense of the Dom and know what you want to communicate.

I can see how React emerged from Facebook and less so Twitter. React seems better suited for creating those banal Facebook applications  (photo albums etc), where algorithms try to give you a sense that you have friends and that people remember your birthday, anniversaries etc, where in reality no one cares. React seems good for algorithmic web filler that facebook often provides.

However, for applications more focused on point to point communication of meaning, I think JQuery is probably best, and even Javascript, so that I will be sticking with these.  

Those who designed HTML, Javascript, and CSS to separate these components of communication were onto something I think, even if standardisation within and across these elements was poor with respect to browsers etc. I get the sense that React is trying to undo this separation to make things that are entertaining.

Just thought I'd share these thoughts. It's always good to express them.
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

marten koomen wrote:React has quite a different paradigm to JQuery.


This is completely true. React and similar component-focused frameworks break applications down into well-defined and reusable components. Libraries like jQuery collect individual elements into sets that can then be operated upon. The approaches are very different.

React seems very application oriented


I'm not sure what that means. Most web development today is focused on web applications, be they simple or complex. I guess it depends upon what one defines as an "application".

The aim of React, and other modern component-focused frameworks, is to break down web applications into increasingly finer detailed components. This helps keeps the various parts of the application modular and focused, as well as testable. This becomes more and more important as the size of an application grows.

there seems no starting assumption with React that you have a well formed HTML Dom that you would like to do stuff with


It is a very different paradigm from jQuery in which you have an existing DOM (not Dom) that jQuery will operate upon. Rather, the React application code that defines the components (usually via JSX) in turn defines the DOM in terms of well-defined modular components -- from high-level containers, down to the individual HTML elements.

React doesn't sidle but barges into a web application.


I have no idea what that's supposed to mean.

JQuery assumes a DOM and is more focused on AJAX type interactions, so its a better fit for a website


This conclusion is specious and uninformed at best. React is no less "Ajax focused" than jQuery. The use, or non-use, of Ajax is completely orthogonal to the decision to use one approach over the other.

React seems better suited for creating those banal Facebook applications  (photo albums etc), where algorithms try to give you a sense that you have friends and that people remember your birthday, anniversaries etc, where in reality no one cares.


This is complete subjective nonsense. React can be used for any type of application, from the banal to the highly mission-critical. Frameworks do not dictate what type of application is being created. You can create a website that just shows pictures of cute kittens with jQuery or any other library/framework if you like. React, Angular, Vue, and all the other frameworks and libraries that came before (even jQuery) can be used for any type of web application.

I believe that you may be letting your disdain of Facebook influence your judgement.

so that I will be sticking with these.  


No one should try to convince you otherwise. Use what you like. Like what you use.

I get the sense that React is trying to undo this separation to make things that are entertaining.


Again, a subjective judgment without basis in fact.

Just thought I'd share these thoughts. It's always good to express them.


This is your prerogative.
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I’ll justify my comments in the event that my thoughts may be of use to others.

My comments are necessarily based on reading about React, I have only used JQuery. I can only explain my views by comparing text from respective books. I have only attempted to write one app and will only write one app if I succeed. I work in education but I’m not a programmer, but I have been close to many failed technology projects in education. These failures have adversely affected students at scale, and My PhD addressed the underlying forces that might explain the number of failed projects in education. Reading the React material clarified a distinction for me on differences between educational and commercial applications, with commercial applications not always having to be communicative and transparent. But again, this is not to cast aspersions on all React applications.

When I suggest that React is application oriented and doesn’t sidle but barges into an application, it is based on upon the reading.

For example, this excellent jQuery in Action  book starts with headings such as ‘Selecting elements’ ‘Working with properties attributes and data’ and works towards ‘Talk to the server with Ajax’. Further, the chapter on Ajax talks about the underlying technology of how Ajax works. These headings suggest jQuery as something that might be used to complement, or sidle, into a bigger application that has an established DOM and CSS.

Further  jQuery in Action  has pithy headings like ‘Separating behaviour from structure’ and ‘Segregating the script’. This justifies the claim that jQuery focuses more separating HTML, CSS and JS than React, a claim that is both sensible and justifiable given the literature. jQuery seems more loosely coupled from HTML and CSS in an application than React.

Reading about React there are lines like this

you will need an installation of node an npm (p 6 Wieruch)



React affects your development environment, and this is what I considering barging into an application. Through proprietary technology React seems to frame the developer’s perspective on architecture.  In jQuery one can add Ajax with any text editor to include a script tag to a library and add a line like $(‘a’).post( url , data,). Given that React impinges on your development environment and requires an extensive setup and paradigm investment, it is not totally orthogonal to a decision to use Ajax.

In  this book on React, Ajax is introduced by building an application (p 168) with little detail on the underlying technology. Other books (road to react and Fullstack React have a similar flavour and have little focus on dealing directly with Ajax. These React books all introduce Ajax as part of an application where the implementation of Ajax is opaque from the developer. None of the books seek to position React in relation to other and existing technologies.

While my reference to banal Facebook applications was perhaps unnecessarily snide, it is not without basis and I reject that it is

complete subjective nonsense


The ontology (where something has come from) and teleology (where it is going) is important. From an educator’s perspective Facebook is associated with conduct unbecoming through its lack of transparency and misuse of data etc. Where educators teach by interacting transparently and communicatively, Facebook does not. This difference became clear to me when reading the React books, without suggesting that React cannot be used for benevolent purposes. It’s just that React seems to veer in a particular direction from my perspective.


I can give further justification for these claims, but technologies like React are not neutral in terms of communicative power. While my comments are open to rebuttal, they are nevertheless made with good reason, albeit from a particular educator's perspective.
The more I read the more I am impressed by the founding parents of the web: HTML, CSS, and Servlets, it’s all well thought through. JavaScript is cool too but remains problematic.
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

marten koomen wrote:I’ll justify my comments in the event that my thoughts may be of use to others.


Commendable. But keep in mind that objective thoughts are of much more use to others than subjective judgements.

For example, this excellent jQuery in Action  book


Thank you. I worked very hard on that book and am glad you found it useful.

These headings suggest jQuery as something that might be used to complement, or sidle, into a bigger application that has an established DOM and CSS.


One of the things that stood out about jQuery as compared with the other libraries of the time was how it took a "hand's off" approach. Prototype, for example, would actually change the HTML element object and builtin JS objects such as the Array.

jQuery seems more loosely coupled from HTML and CSS in an application than React.


Absolutely. But this is always the case when comparing a library and a framework.

Reading about React there are lines like this

you will need an installation of node an npm (p 6 Wieruch)


React affects your development environment


Any modern JavaScript framework requires a much more complex toolchain and build environment than the old days of just including a script into an HTML page. This is not specific to React, but rather to modern-day development. It is, in fact, not even specific to front-end. In the Java world, package managers such as Maven control dependency management. In the JavaScript world, it's one of npm or yarn.

Dependency management is a necessity in the modern development environment.

Through proprietary technology React seems to frame the developer’s perspective on architecture


What proprietary technology are you referring to? React, and just about everything one would use with it, are open source.

In jQuery one can add Ajax with any text editor to include a script tag to a library and add a line like $(‘a’).post( url , data,). Given that React impinges on your development environment and requires an extensive setup and paradigm investment, it is not totally orthogonal to a decision to use Ajax.


Your conclusion does not match your assertion. That exact same line could be used in a React application to perform Ajax. Although one would not include jQuery into a React app just to use its Ajax methods -- one would use the native fetch API, or a more modern and focused library such as axios for Ajax.

So again, whether you are using Ajax or not is immaterial. Every React web app I've written or worked on uses Ajax -- I just don't see why you think that is a factor.

None of the books seek to position React in relation to other and existing technologies.


This is a complaint about the books, which I generally happen to share. I feel that most books introduce asynchronous operations far too late. Just about every web app that does anything the least bit meaningful uses asynchronous operations and it's something I always feel should be introduced earlier.

But again, that's a complaint about how books are written and doesn't have much to do with technology selection.

From an educator’s perspective Facebook is associated with conduct unbecoming through its lack of transparency and misuse of data etc. Where educators teach by interacting transparently and communicatively, Facebook does not. This difference became clear to me when reading the React books, without suggesting that React cannot be used for benevolent purposes. It’s just that React seems to veer in a particular direction from my perspective.


Again I feel that your perspective is skewed by your obvious disdain for Facebook. React as a technology can be used for any type of application and its origins at Facebook do not warrant viewing it as something that is intended to create applications similar to Facebook or other applications with "unbecoming" behavior.

This is what I mean by subjective nonsense. React does not veer in any particular direction with respect to the conduct of applications created using it.

the founding parents of the web: HTML, CSS, and Servlets


Servlets are not a "founding parent" of the web. They are a technology specific to Java back ends. And while Java server software powers a large part of the web, it's not a fundamental technology; the fundamental "primary colors" of the web are HTML, CSS and JavaScript.

 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

objective thoughts are of much more use to others than subjective judgements


Agree, but my OP had a subjective flavour as the choice of technology is subjectively influenced based on my domain (education) and lack of general programming experience. Subjective thoughts might still be valuable, and hence I shared them in light of the rich responses to my OP. My decisions are necessarily based on intuitions based on imperfect knowledge, so they may not sustain justification.

This is a complaint about the books, which I generally happen to share.  


I have since received Learning React by Banks & Porcello which does a better job of locating React; alongside JavaScript at least.

React as a technology can be used for any type of application


I'm sure this is true, and my disdain for Facebook was overstated. Nevertheless, the education application I'm working on has made me reflect on the different technologies I've encountered over the years. For example, in my application the server has precise knowledge of the client's DOM, and knows how to change the view in the browser using $().append $().prepend $().replaceWith etc in response to client actions. In my context there seems no advantage in having a framework such as ReactDOM as an intermediary for keeping track and updating the DOM. But this judgement is made on limited familiarity. Nevertheless it suggests a distinct branch of application for the technologies.

Dependency management is a necessity in the modern development environment.


Dependency and environment management are the bane of my semi-professional experience, I generally have problems setting these up, so again it's a justifiable subjective choice to steer away from making this more complex with proprietary tools, even when free and open source. (currently addressing an issue with the database driver not being recognised when using Eclipse, these are the most difficult to solve in my experience, that and architecture)

Servlets are not a "founding parent" of the web


Sure, but in the context of this thread where  the OP inquired about servlets it's relevant. Also the Head First Java Servlets book was phenomenal in my view in terms of opening the field. I am also exploring a related issue on whether I need Spring MVC, when my application already has a single controller/dispatcher servlet to manage HTTP requests/responses. Why is MVC necessary when a project can be designed around a single servlet (rhetorical question, will read up).  I'm still exploring this and thinking servlets with post and get are pretty solid technologies.

As a final comment, I'm trying to make a judgement here over whether React will be a long lasting branch or if it too will become passe soon. For me, elements of React are reminiscent of Adobe Flash and Dreamwever, with these comparisons not quite valid as React seems to have a broader base . Part of JQuery's appeal was that it addressed browser issues and JavaScript quirks, it seems that ES6 and the maturation of browsers have addressed many of these problems, and that there maybe a return back to pure JavaScript. I note David Flanagan JavaScript 7th Edition (another excellent author) is coming out in July which gives support this hypothesis. But I don't understand this landscape fully.
 
 
Saloon Keeper
Posts: 12484
269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think an important question is: What is the application used for? If it's intended to teach students, I would argue that including NPM and excluding jQuery are especially important, because otherwise it will just be contributing to another generation of young programmers whose skills are hopelessly outdated straight out of the gate.

Also, you will find that research in other fields is done with the help of cutting edge technology developed by businesses. Why not in computer science?
 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I think an important question is: What is the application used for? If it's intended to teach students, I would argue that including NPM and excluding jQuery are especially important


While I'm foggy on the technology, I'm quite clear what I'm trying to achieve educationally. It's not to teach a particular technology, that would be training, education is more about teaching broad patterns and while I've not taught computer studies/science for some years, my preference would be to teach programming through something like Logo which teaches broad underlying patterns, something Seymour Papert was renowned for.

In terms of patterns, HTML, CSS and JavaScript seem to be an enduring pattern on the internet, with JavaScript being the last one to calm down, perhaps ES6 might do that. I need to make a judgement for myself if React will be enduring, or if it will pass by the way of Angular JS, Adobe Flash, Dreamweaver etc (although I'm not fully up with the technologies). React certainly seems more robust, who knows. And jQuery does seem a transitory compensatory technology for a lack of standardisation across browsers, as well as providing short cuts.

MVC is another important pattern, and I'm working under the hypothesis that the web is not good at the kind of point-to-point communication required for education. So I'm trying to maintain the integrity of meaning - be it by gesture, image, video or text - for communication between teacher and student. Automation and algorithms can distort this communication, and this is a major source of critique in certain areas of educational academia. So I'm looking to avoid intermediary technologies that can enhance/distort communication. I'm not saying React will do or not do that, it's just a general concern of mine.

help of cutting edge technology developed by businesses


The relationship between education and business is uncertain for me. I worked on the PISA project in its early years when it was cutting-edge and managed by Australians. Australia is now in decline on its scales (graph below). I also conceived and successfully managed its first international computer-based test (pure Java - I didn't program) which got me an invite to a large firm in Menlo Park ~2005, after which I went into Kepler's bookshop to buy some books on philosophy. I had a hunch that technology inspired education was heading in the wrong direction, and unfortunately the graph below now supports that hunch. Conflicts across education, business and technology has affected my career, and not always in a good way.


Further, the health of democracies - which is a function of education - seem compromised across the globe and my hypothesis is that how technology is used in education affects this. An inordinate focus on science and technology without ethics or moral education is my hypothesis here.

But in the end, I'm a plodding educator who can't program very well, and I think Java Ranch is really cool because it's very communicative and real.  I'm currently solving a classpath problem lol.
 
Greenhorn
Posts: 16
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a few things to add here, since it seems to me that there's just a lot of resistance to using well established tech with dated conceptions around Javascript.

The primary concern I have is this: It sounds like the approach here is to execute any arbitrary Javascript returned from a server. Hopefully you account for the XSS implications here, but I obviously don't know your application.

With that out of the way, I just had a few comments:

Frameworks such as React were essentially built to do what I think you want to do. Re-usable components. There is a fairly steep learning curve, however, but that's really the case with any new framework. At my employer, we've written complex administration tools as well as customer facing applications using Vue (Similar conceptually). I'm not advocating for or against using one of these frameworks, as, like I said, there is a learning curve, but know that they're generic enough to make pretty much anything you'd want.

I'm currently solving a classpath problem lol.



This is what dependency management (like Maven) is for :-) I write Java every day, and I would never write a Java program without some sort of dependency management. Even on personal projects. I can't imagine manually adding libraries to the classpath for a considerably sized project. I've done it before on smaller projects, and it's just not worth the effort.

While there is a bit to learn with Maven, it's pretty minimal. It also has the nice side effect of encouraging adding dependencies by making it much easier. Since you seem to have an aversion to what you call "proprietary" code (Which is incorrect) I want to emphasize this isn't a bad thing. Dependencies can be something as simple as Apache StringUtils (Which I use daily) for String operations, or something much more complex, like Spring. Either way, these are often well tested in production and can significantly speed up development.


 
marten koomen
Ranch Hand
Posts: 226
1
jQuery Postgres Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Christopher, another reason why I love this forum
.

Frameworks such as React were essentially built to do what I think you want to do. Re-usable components.


You are correct, and a great part of my application is a "complex administration tool" similar to what you mention. Further, I think React may do this well if I was able to get my head around it. However, one of the features in my application is that the HTML and JavaScript are built on the fly where the id for DOM elements and the CSS class selectors are randomly generated. This allows me to attach events using the class selectors to DOM elements, where the event sends to the server the class selector along with the id of a parent element so that the server knows what to do (class selector) and with what resource (element id). The Controller Servlet then uses this data to assign responsibility for the response to a response handler. In principle my pattern seems to work a bit like Spring MVC, but in baby steps. Also, this is not the total scope of interaction, but a large part of it.

This is the main reason why I'm adverse to dependencies such NPM and Node, my application is basically a big StringBuilder or automated text editor. This makes the incorporation of other interfaces like NPM problematic, conceptually at least. However, this problem may be easy to resolve in practice and I'm not familiar enough.

Hopefully you account for the XSS implications here


I'm trying my best, as a starting point I'm thinking of SSL, randomised ids and class selectors etc, and a single Controller Servlet through which additional security features can be added to in the future. But in the end, my application will not involve marketable or sensitive user data. But I'm keeping this mind, with perhaps more robust solutions should  this get to a commercial stage. (I'm also using prepared statements for access to the database)

This is what dependency management (like Maven) is for :-)


Total agreement on that, having worked in Netbeans last time, which I think had/has ANT in the background, I was totally adverse to Maven, but this week I bit the bullet and solved my dependency problem by working with Maven.  So my setup now is Eclipse, Maven, Tomcat, Git, Postgres.  This was a steep learning curve this week, and I now feel like I'm out in the wild, having previously been able to refer back to the Head First and Murach books through which I learnt programming.

My environment works but still seems brittle with how it manages Tomcat and debugging. I'm hoping I will be able to iron that out. But having gone to Maven I now have a better sense of what applications are built on, how cooperation is important, and that keeping an ordered development environment is important.



 
Ranch Hand
Posts: 143
6
IntelliJ IDE Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Royale Summers wrote:
I just completed a Boot Camp cert in Java...



Which boot camp is this ?
 
Ranch Foreman
Posts: 2015
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quite informative thread

Bear Bibeault wrote: If you want to stay current, most new front-ends these days are SPAs (single-page applications) using React or Vue.



And what about Angular ?
 
Bear Bibeault
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Monica Shiralkar wrote:And what about Angular ?


Plummeting in popularity.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic