• Post Reply Bookmark Topic Watch Topic
  • New Topic

Insecure of architecture, programming tools and frameworks  RSS feed

 
Anders Nylund
Greenhorn
Posts: 7
Debian IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

First post on any kind of programming forum so please bare with me I'm not sure if this is the correct thread to post to but here we go.

I've started working on this moderately large Java Web project. The final product will be an intranet for a small company. The development team consists of me and another collegue, that however has his own job, and therefore will not participate in development full-time. He and I have moderate experience in Java so we decided to choose that as our main language. The goal is to make a MVP of the product, but still trying to get a good base for further development. Modularity is a big priority (the reason we decided to create our own REST API). The intranet will consist of the following modules:

- An interface to a RESTful web-client that consumes and processes data from XML to POJO's. (Java with JAXB) This part is not under our control.
- A database for storing created data and metadata of the interface (MariaDB/Connector J)
- Our own RESTful API that produces JSON data from both the interface and from our own database. (Maven, Grizzly, Jersey)
- Back-end that consumes (GETs) and produces (POSTs and PUTs) JSON data to/from the RESTful API. (Node.js)
- Front-end (AngularJS)

I created a simple diagram to visualize things


We tried using Tomcat for running our REST API, but didn't get it to work so we followed this tutorial to create a Grizzly web-app built with Maven (http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/basic_grizzly_jersey/jersey-grizzly-json-service.html)

I have about 2,5 years of programming experience so this all is completely new to me! So therefore I've turned to you guys to get some peer-review and thoughts on how I should make things work (and I needed somewhere to ventilate and share my ideas). I've been working on this for a month now, planning and testing different tools (JAXB, Tomcat, GlassFish, JAX-RS and more) and surfing stackoverflow and forums to get ideas. I even considered using Django at first, but my collegue didn't like that idea!

Thanks for reading and I hope you found this interesting! Do you think this would work and are there somekind of hidden problems that I haven't tought about and should know?
 
s ravi chandran
Ranch Hand
Posts: 579
6
Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From my very short experience on REST, I had lot of trouble in managing states of my data across various services. Your application will be stateless or stateful? Preferred way is stateless processing but our project had limitations which forces us to maintain states even in REST calls which is not recommended.

If your application will be processing small messages at high frequency,  better to think of GC from those objects.

 
s ravi chandran
Ranch Hand
Posts: 579
6
Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I missed the part where you clearly specify using RESTful. So session will be maintained. And you will have coordination between requests from db and the exposed API.

Case for synchronization checks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66305
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the purpose of the NodeJS middleman? Seems like an unnecessary layer.

Also, AngularJS is considered a bit long-in-the-tooth at this point. I would think that a fresh green-field project would be considering one of Angular 2, or React.
 
Junilu Lacar
Sheriff
Posts: 11477
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anders Nylund wrote:The goal is to make a MVP of the product, but still trying to get a good base for further development.

By "MVP" did you mean Minimum Viable Product?

In your current state of development, what are you still missing, what's not complete yet, and what are you struggling with the most?
 
Anders Nylund
Greenhorn
Posts: 7
Debian IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s ravi chandran wrote:From my very short experience on REST, I had lot of trouble in managing states of my data across various services. Your application will be stateless or stateful? Preferred way is stateless processing but our project had limitations which forces us to maintain states even in REST calls which is not recommended.

If your application will be processing small messages at high frequency,  better to think of GC from those objects.



Do you mean Garbage Collection with GC? Our application will connect to the external API and marshal the data (which might sometimes be tens of thousands of entities and attributes) to POJOs from it. So should I somehow enhance Java's existing Garbage Collection?

What do you mean with maintaining states even in REST?
 
Anders Nylund
Greenhorn
Posts: 7
Debian IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s ravi chandran wrote:Okay, I missed the part where you clearly specify using RESTful. So session will be maintained. And you will have coordination between requests from db and the exposed API.

Case for synchronization checks.


We are trying to use as much resources as possible directly from the external REST API, so that we have to maintain our own DB as little as possible. Our own DB is only for storing data that we create ourselves as logs, different "tasks" that we create and metadata of the external API
 
Anders Nylund
Greenhorn
Posts: 7
Debian IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:What's the purpose of the NodeJS middleman? Seems like an unnecessary layer.

Also, AngularJS is considered a bit long-in-the-tooth at this point. I would think that a fresh green-field project would be considering one of Angular 2, or React.


I have little to no experience of developing websites, and especially using JavaScript and therefore my colleague will focus on that as he has used Node and AngularJS. So it would be possible to use only Angular and consume the JSON that our API produces?
 
Junilu Lacar
Sheriff
Posts: 11477
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would be careful about discussing things like GC and stateful vs stateless without knowing more details than only what has been offered so far. Seems like way too many unconfirmed assumptions are being made in these last few replies. Beware of getting tangled in the weeds before you even have a chance to survey the general lay of the land around you.
 
Damon McNeill
Ranch Hand
Posts: 67
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Beware of getting tangled in the weeds before you even have a chance to survey the general lay of the land around you.


That's as good a quote as I've seen regarding premature optimization.
 
Anders Nylund
Greenhorn
Posts: 7
Debian IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Junilu Lacar wrote:
Anders Nylund wrote:The goal is to make a MVP of the product, but still trying to get a good base for further development.

By "MVP" did you mean Minimum Viable Product?

In your current state of development, what are you still missing, what's not complete yet, and what are you struggling with the most?


Yes MVP stands for Minimum Viable Product.

Currently I am experimenting with the external API and learning how to transform that to useful information to us and trying to produce some meaningful JSON from it. So we are still figuring out what information is available, and how we can use it. Therefore we haven't started even planning the DB yet.
The biggest struggle currently is deciding how I will represent data through our API i.e if I should create my own resource classes or not, as currently I'm just Mapping the POJO's created with JAXB from the XSD-files, which includes information that is not relevant to us.
 
Anders Nylund
Greenhorn
Posts: 7
Debian IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And thank you all for answering!

As I am still a programming greenhorn and this is a relatively large project, I also needed to ventilate my thoughts somewhere, so I decided to join Coderanch and ask from someone more experienced.
The architecture of our app will probably change many times during development, but it's good to see that the questions you asked where quite specific. So we are at least on right track!
 
Junilu Lacar
Sheriff
Posts: 11477
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your diagram looks reasonable and nothing jumps out as being a potential issue. However, I'd remind of something I did another poster recently: Rene Magritte's The Treachery of Images and the inscription Ceci n'est pas une pipe. A picture may be worth a thousand words but when the viewer has to fill in those words themselves, there's no telling what they will be or whether they're even going to be the same words the creator of the image had in mind. A design has to be precise and everyone has to be in exact agreement as to what everything means. Any time people are not on the same page, that's manifested as a bug in the software.

Jack Reeves wrote three essays explaining his view that code is the design and I firmly believe in that view. If you have any questions or doubts about your darchitecture and design, the best way to get feedback is to share relevant sections of code so we can see your words and get on the same page.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66305
152
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anders Nylund wrote:
Bear Bibeault wrote:What's the purpose of the NodeJS middleman? Seems like an unnecessary layer.

Also, AngularJS is considered a bit long-in-the-tooth at this point. I would think that a fresh green-field project would be considering one of Angular 2, or React.


I have little to no experience of developing websites, and especially using JavaScript and therefore my colleague will focus on that as he has used Node and AngularJS. So it would be possible to use only Angular and consume the JSON that our API produces?

Yes
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!