With Cloudbees, is it possible to store web pages (i.e. views) separate to the application (i.e. model /controller) such that web pages can be edited by a third party web designer, or can this only be done prior to building the app. I am developing in Java with Spring, and can do this locally, but can’t see a way to do it with Cloudbees.
Share
Your question is actually more about how you build your application rather than how to work on CloudBees.
If you are building your application with, for example Maven, you would structure your project into a multi-module project with a
.jarmodule for the application code and a.warmodule for the web application. You could put the two different modules into separate SCM repositories and have Jenkins build them both and finish off by deploying to CloudBees’s RUN@cloud service.This is by no means restricted to Maven, you can do the same with ANT or any build tool worth its salt.
The choice of SCM can make this easier or not…
If you choose GIT as your SCM (and all the kool kids use GIT) be aware that GIT is designed to hold all the things, that will be released in one go, in the same GIT repository within a unified subdirectory tree. By this I mean that you cannot [easily] checkout (or tag) only a portion of the GIT repository. So, for example, if you had a multi-module Maven project in a GIT repository, you have to check out all the modules at the same time, the web designer will have to go to the
webapp/src/main/webappdirectory to work on those files and ignore the other files… oh and the web designer will have all the files on their machine anyway. When it comes time to cut a release, you will be releasing everything in one go, so all the modules will have the same version number. This means that you will be cutting a new application.jarrelease even if all the changes were in the.jspfiles… on the other hand, you know you are using the latest.jarcode every time you cut a release. There are follies such as GIT submodules that can lure you into thinking they might be a solution, but these aren’t the solutions you are looking for.If you choose Subversion as your SCM, things are different. Subversion allows you to check out and tag only a portion of the tree. Thus you could actually just give the web designer the SCM URL of the web pages part of the tree, they can then check out only that and work on only that. Sure they loose all the joy of distributed SCMs, but they don’t have to see any unnecessary distractions. There is a down-side… namely they cannot easily fire up the web application for themselves to validate their changes. They are limited to guessing that the changes they have made in the
.jspfiles are going to produce valid HTML markup.My personal recommendation is that designers are not stupid (or maybe just our designer is not stupid). You tell them where the files they need to work on are located and that’s where they will work. They won’t go making changes in the rest of your code… and you’re using a SCM anyway, so even if they did make changes elsewhere, you can roll those changes back easily. If you have secret sauce that the designer should not see, then you are doing it all wrong in the first place.