Spring web development advice - html

At the moment I'm learning spring and have the basic website running now on tomcat. Can I ask, how do you load images onto the website now and where do you store the images, css, javascript etc in your project folder?

The answer depends a lot on your development/deployment environment. If you are using Maven for example, which has a specific directory layout, you would put the files in src/main/webapp/.
If you are using Eclipse as your IDE and use Ant to build your project, you would normally use WebContent/.
In any case, I would advise to use specific folders for each type of file. You can still use Tomcat Filters, if you want to influence the headers that are sent with the files. (Important for caching, ...)

Related

How to organize Web Development using Git

Web Developers!
How do you go about organizing your Github projects for your front-end and back-end?
For example, I have a python script that generates a JSON file that the front end JavaScript consumes to generate data on the pages.
Would you create one repository with two directories labeled front-end and back-end?
Or would you make two different repositories?
I'm interested in what developers do in the wild. Because up until now I found myself having a complete clone of my website in a directory on my desktop PC, and just pushing individual files via SFTP from there.
I'm getting to the point where I have enough *.old files that I want to implement version control so I can view much older states of code with Metadata like date and user that edited it.
The answer is yes. Make two different github projects.
Just Like Michael W has stated, "[...] this is highly opinionated". What I find to be the most common approach is to implement a single github project when still in development and especially when you're developing on your own. This is useful because you don't have to switch up between repositories and/or branches, which saves time.
Another common approach is to split them up. However this approach is only possible when both projects can run independent from one and other. In your case it's important to split the project logically. If the python project only generates JSON files and places them on a server location, then I would place that into it's own github project, because the main purpose is to generate files, so the python application can run on a server seperate from the frontend. If the webapp only consumes the JSON files through maybe a rest call or through a connection to a FTP, then also that can be placed within it's own project.

Updating my website/ web hosting?

I'm new to web design and website deployment. I had some general questions that I tried to research but failed. I know how to use Html/CSS/Javascript and I managed to design my own website and upload it and host it using Amazon s3 / Route 53. It's a website built from scratch with HTML, CSS.
The thing that I have failed to understand is managing the website after deployment. Do I simply add HTML pages to my amazon bucket whenever I want to update? is this the way to do it? I came across jekyll in my research and from what I understood, it's a static website generator. But does it help with organizing the website and facilitating adding more content after deployment?
in other words, how do developers go about managing their websites generally after deployment?
I don't know about the Amazon s3 or jekyll etc. How I manage my sites is I use a hosting provider that provides Plesk. With Plesk I manage all my files for my sites in the file manager and I can even edit the code in the online code editor provided. It also has built in apps like Joomla and Wordpress.
I can set up email addresses for each site and also subdomains. Security etc.
When I want to update or edit my site I will either do it in the online code editor if it is something small like changing a color or just a few lines of code. Otherwise for bigger edits I will do it all on my desktop using notepad and then upload all the new files and replace the existing ones.
Each domain has it's own folder in the directory so it is easy to maintain and things don't get messy.
I hope this helps. You said you want to know how developers manage their sites. Although I am not a professional developer, I do have a few sites and that is how I manage them.
It only costs £40 per year too so is quite cheap.
Do I simply add HTML pages to my amazon bucket whenever I want to update? is this the way to do it?
Yes. The simplest way is to make changes to your files in your local workspace and then upload/overwrite the changed files to the S3 storage.
But does [jekyll] help with organizing the website and facilitating adding more content after deployment?
Yes! Jekyll is a great way to organise and generate your static site and I highly recommend it if you are planning to continue creating and deploying content to your site.
Start here, but note that it's a little more difficult if you're on Windows OS.
https://jekyllrb.com/docs/installation/#requirements

IDE for web project working with distant copy

We currently have an intranet host on a server (just Html and js project).
contributors do not have a local copy of the project, and modify the code on a regular basis using Expression web. However, a lot of Expression web's features, like link maintenance, do not work if the project is not on a local cache.
Do you know any good web IDE capable of maintaining a web project directly on a server ?
Thanks
This IDE may work for you it is biased in the cloud.
https://c9.io/

How to get a simple Bootstrap Site on cloudControl

I'm trying to deploy a simple Website - a couple of html sites based on twitter-Bootstrap templates - on cloudControl.
Unfortunatelly It seems I can only deploy a Java, PHP, Node.js and some more applications but not just some html sites.
Building a Java or any other application just to show some html sides seems to be an overhead to the scope.
Is there any suggestion how I just can deploy html sites to cloudControl ?
I would suggest php, the buildpack automatically provides apache as web server and delivers static html files directly.
In all other cases you have to provide the server by yourself and it seems like you just want some static html pages.
I think NodeJS would be your simplest option. Start with a simple server like this..
https://github.com/spadin/simple-express-static-server
Put your HTML/JS/CSS files in /static, and it's ready to deploy

HTML File Upload - Practical Limit?

We are designing an internal web application to which we would like to upload a very large file (100mb). Is an HTML file upload even an option here?
If it is not, what other tools (Java applet, Silverlight, Flash) could we use to perform a file upload this large? Is uploading a file this large practical at all?
Edit: You can assume that there will be appropriate server side code accepting the file upload and handling the data. This question is specifically about the client side interface and the HTML file upload interface.
I'm no expert on file uploading, but my understanding is it's either impossible or very difficult to upload a file with HTML alone. You will probably need some server-side scripting like PHP, JSP, ASP.NET or something to process the upload and persist the file on your web server/database. Any well-designed implementation should allow for a size limit to be set and enforced, but with larger files it would be a good idea to include a progress indicator like a percentage and/or progress bar so the user knows the upload is still working and isn't hanging on slow connections.
I just downloaded this UploadBean component and deployed the WAR under the downloads section on an apache tomcat instance and the SimpleUpload.jsp example worked really well right out of the box. If you're using Java I'd highly recommend this approach.
http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
with javascript/jQuery/Mootools/Flash there are plugins that allows you to check file size before upload, and basically has server side script as fallback validation as well. Take a look at jQuery Uploadify or Mootools powered fancy upload they use flash and javascript with server side script in the backend. These two plugins use flash + JavaScript on client side
Being that it will be for an internal web application I am assuming you don't have any server-side imposed limits on the server that will be running this. If not then you should be able to upload large files.
See http://www.uploadify.com/ - nice and easy to implement
See http://encodable.com/filechucker/ - good if you are looking for more advanced management for your uploaded files.