I have a play 2 Scala application and my customer wants to add a blog solution in a subfolder of this application. I came accross this java blog solution called Apache Roller.
The issue is that I am not able to find it as a jar on maven repo to download it with sbt as we do with other libs because it comes as a war. Is there any way to use a war INSIDE a play 2 app? If yes, where to put it?
I'm on the Apache Roller team and thanks for considering our product. Roller is meant to be a stand-alone web application, just configure your database, drop the WAR into Tomcat and you're set. If desired, Roller offers an LDAP authentication option so users won't need a second set of passwords. [Incidentally, while not yet released, our 5.1-SNAPSHOT is already considerably ahead of our current production 5.0.4 and is expected to be released "soon", so you may wish to consider that option.] Trying to merge WARs will take an exceedingly long time and probably result in a buggy solution, so I would first confirm that your customers will not approve a separate application before trying to integrate blogging software. The Roller User's Mailing List is available if you have any questions.
There is another Java solution, JBake, as it's not a standalone blog server like Roller you may find it more integratable in your web application. (I have not worked with the product so am unsure.) You may end up needing to create the blog entry edit screens, however, prior to feeding the results to JBake.
Related
For the last couple of years, I've been developing a web application based on CodeIgniter. CI has served me well to date, but for the next generation of the software, I'm looking to move to PHP 5.3 and a more robust framework. I've watched FuelPHP since it showed up about a year ago and now that I'm getting to the point of starting the development of the next version of the application in earnest, I'm interested in giving FuelPHP a go.
My application relies on the use of multiple application directories. Essentially, there's a system application which has the system's core functionality, code that shouldn't be touched by admins because it'll be changed during updates. In addition, there's a user application directory where admins can extend and override system classes. This way, admins can customize the system without ever touching the system core (thus insulating them from losing their modifications when the system is updated). When a request comes in from the URL, I want the system to first check the user application directory. If it doesn't find the controller there, move on to the system application directory (where, in theory, it should find the file) and use that controller.
I don't want to make the mistake of approaching this problem from a CI or Kohana mindset, so what I'm wondering is what's the best way to go about doing this in FuelPHP? Since I don't have much experience with FuelPHP, I was hoping someone might be able to give me some pointers or shove me in the right direction.
Thanks!
FuelPHP has an 'app' folder that you can consider the core of your application. For smaller applications, it can also contain your application code.
For larger and/or more complex applications, use modules. A module has exactly the same folder structure as 'app', but lives in it's own namespace (= the module folder name). FuelPHP supports multiple module locations, so you could have a location that contains modules you share over different websites, and modules that are specific to your website.
Without any special routing, if the first segment in the URI is a module name, controllers from that module will be loaded.
I need a bit of clarity regarding whats possible with grails plugins before committing my self to a corner a month or two down the line,
We have two applications built in Grails what share the same model, however we are looking at creating a single application which will control the ACL and add the two Grails applications as plugins.
Now the two applications are very extensive and they have their own controllers, views and routing.
Is it still viable to integrate the two applications as grails plugins or is there another better way of doing it. In the past I have found that following a quick simple guide / tutorial on how to create a grails plugin for instance, might not really explain the other issues I might encounter as I take the two big applications which use plugins of their own and try to convert them to plugins...
Any heads up information would be appreciated.
Everyone's needs are different. I'll simply explain what we've done on a current project and then you can use that to help make your decision.
We have a "common" grails plugin. This plugin contains all of our domains, controllers, layouts, views, css, images, and js that are shared throughout our grails applications. The common plugin has the spring-security-core plugin installed since the security domains are, well, common to all the other applications. However, each application that uses are common plugin still specifies its own security. It uses the domains from common as well as the spring-security-core plugin installed in common, but each application can control its own access points and lock down the URLs that need locked down.
We have an admin application
We have a customer facing application which has both secured and un-secure content.
And we have a couple other internal only applications that use our common plugin.
We've been at this for 6 months and haven't noticed any drawbacks to this approach.
I am working with Coldfusion 9, running under jBoss/Liferay 6.
All is well, I have developed quite a few portlets that I have made work around for (when I run into some issues that I could usually handle in a straight forward fashion). Overall Coldfusion 9 portlets work very well inside of Liferay.
One thing I really dislike is that the URLs are so unreadable, and I was really hoping for clean urls for my application, so when a user searches, and the result comes back, I can have them click a link like http://liferaysite.com/web/viewitem/ABC123.
Currently I get a raggedy URL that includes portlet status, properties, the portlet ID associated with the variable that I am passing (usually a combination of portlet id + variable) and other garbage that is un-needed.
Is there any 'easy' way to get clean URLs? My issue is that I am not a JAVA person, so I am not too confidant in digging into jBoss/Liferay code to get something done. However I feel that Liferay is sufficiently 'hands-free' so that I can build my portlets and deploy them without modifying JAVA code and getting dirty.
Any ideas? I am not able to find many articles on this, especially since Liferay 6 is so new, and there are so few people posting things about it. Maybe this would be some sort of URL rewriting in Jboss?
Thank you, appreciate any and all suggestions :)
The short answer is to use URL rewriting to achieve this and transform Liferay URLs to any form you want. There are 2 possibilities I see to do this:
Put an Apache web server in front of your Liferay server and use mod_rewrite
Use the URL rewriting filter that is already included in Liferay as this mimics what mod_rewrite does without the requirement of an extra Apache server
You might be interested in FriendlyUrlMappers. See this blog entry about the basics.
Regarding the "easy" you have to judge about that yourself. The nature of portals, e.g. combining completely different and independent applications (portlets) on a single page bring with it that you loose control over URLs (by default), because the portal has to disambiguate quite a lot of stuff. In order to get back control, you need to do some work, FriendlyUrlMappers impose some work, but the result is worth it IMHO.
We have an application at work which is web-based and comes with a bundled web server (Apache tomcat), and is for network monitoring/patch management. It allows for personalisation, all sorts of rules, custom UI design using proprietary components and definition language, and even custom code to fire on events (based on Java).
I am in a team of several developers, each of who will be customising this app to meet various requirements. As it's a server app, not a codebase, what's the best way to setup a dev environment for >1 user?
If there is one single shared VM with this app, I don't know how good source control like TFS would work with this sort of system? I think also, developers working on various parts of the project may even need the same file at the same time (though TFS does do multiple check-outs).
What is the best way to develop against this sort of product? Bare in mind, even with personal VMs and an instance of the app, changes have to be merged to one central instance. Something keeps making me think about how app-virtualisation could help with this?
Thanks
If it is just an instance of Tomcat (even though it was bundled) couldn't you put the whole Tomcat directory and all of its subdirectories under source control? You just need to check in the non-binary parts, so exclude all the .jar, .exe, .tar.gz and .dll files when you check in. That's what I would do, unless I misunderstood your question.
I'm not familiar with the source control software that you mentioned. I have been using SVN (which is free) and TortoiseSVN as a client (also free). Just an option if your software can't support what I've suggested.
I need to create some way to get a local WAR file deployed on a Linux server. What I have been doing until now is the following process:
Upload WAR using WinSCP.
SSH into server using PuTTY.
Move/Rename/Delete certain files folders to prepare for WAR explosion.
Explode WAR.
Send email notifying users of restart.
Stop Tomcat server.
Use tail to make sure server stopped correctly.
Change symlink to point to exploded WAR.
Start Tomcat.
Use tail to make sure server started correctly.
Send email notifying users of completed restart.
This stuff is all relatively straightforward. And I'm sure there are a million and one different ways to do it. Id like to hear about some options. My first thought was a Bash script. I have very little experience with scripting in general but thought this would be a good way to learn. I would also be interested in doing this with Ruby/Python or something current like this as I have little to no experience with these languages. I think as a young developer, I should definitely get some sort of scripting language under my belt. I may also be interested in some sort of software solution that could do this stuff for me, although I think scripting would be a better way to go for the sake of ease and customizability (I might have just made that word up).
Some actual questions for those that made it this far. What language would you recommend to automate the process I've listed above? Would this be a good opportunity for me to learn Bash/Ruby/Python/something else, or should I simply take the 10 minutes to do this by hand 2-3 times a week? I would think the answer to this is obviously no. Can I automate these things from my computer, or will I need to setup the scripts to run within the Linux server? Is the email something I can automate or am I better off doing that part myself?
More questions will almost certainly come up as I do this so thanks to all in advance.
UPDATE
I should mention, I am using Maven to build the WAR. So if I can do all of this with Maven please let me know.
This might be too heavy duty for your needs, but have you looked at build automation tools such as CruiseControl or Hudson? You might also want to look at Integrity, which is more lightweight and written in Ruby (instead of Java like the other two I mentioned). These tools can do everything you said you needed in your question plus way, way more.
Edit
Since you want this to be more of a learning exercise in scripting languages than a practical solution, here's an idea for you. Instead of manually uploading your WAR each time to your server, set up a Mercurial repository on your server and create a hook (see here, here, and especially here) that executes a Ruby (or ant, or maven) script each time a changeset is pushed from a remote computer (i.e. your local workstation). You would write the script so it does all the action items in your list above. That way, you will get to learn three new things: a distributed version control paradigm, how to customize said tool, and how to write Ruby scripts to interact with your operating system (since your actions are very filesystem heavy).
The most common in my experience is ant, it's worth learning, it's all pretty simple, and very usefull.
You should definately automate it, and you should aim to have it happen in 1 step.
What are you using to build the WAR file itself? There's some advantage to using the same tool for build and deployment. On several projects I've used Ant to build a Java project and deploy it to the servers.