Create HTML Reports with JBoss? - java

Are there any libraries (built-in or third party) for writing .html reports with JBoss apps quickly and easily?
I have a list of entities in a database that I want to display in different tables. There will need to be things like links within the report to go from some parts of the report to other parts, sorting/paging, and some nice CSS to make the report pretty would be nice.
I have an existing application that produces the .html and .css programmatically, but due to the huge size of the data (124Mb in some cases), the writing of the .html takes way too long (40+ minutes) and often freezes up the browser. So I am looking for an alternative.
I guess one solution is to write JSF forms that fill rich tables with bean data, but I am not sure if this is the best approach.
Replies highly valued! Thanks

Have you looked into JQuery? It offers large number of plug-ins to achive pagination, tables, sorting etc. and it sound like it might be a good fit for your case.

JasperReports is open source, flexible, and perfect for my needs (I am reporting using xml data, and a simple transformation will be perfect to JSXML format to produce reports in this way).

Related

Simple CMS functionality like wordpress

I need to develop simple CMS functionality, it supports multiple pages with static HTML ( with WYSIWYG editor)
To keep it simple, I can save the content in DB and give an ID to the page and permalink.
For every request, take the permalink ( from URL) and serve the content read from the DB.
While this is not efficient, I can think of following approach,
In the start-up and while editing, load the content and push it to the CDN server with permalink path. But, it increases the development efforts.
I have following questions based on above
1) Is it good practice to save the HTML content in DB, if not what are the alternatives ?
2) How does the Wordpress does this, So I can take design clues ?
3) Is there any very simple CMS product that I can customize, I cannot use wordpress because it has too many features, It would be better to develop the CMS rather than maintain the wordpress huge code base ?
Saving HTML in DB is perfectly fine and AFAIK WordPress does it that way.
If you would do it by yourself you can provide some cache in files (e.g. for content visible on main page).
Anyway I would prefer WordPress, since it has e.g. anti-spam filters, sitemap generations and so on. And you have all updates for free, what is really important.
As seen, saving HTML in the DB works. But definitely not the neatest approach for saving an entire page/template.
You should check out CouchCMS. The developers made use of #stacker's approach. They introduced custom tags which can be used to declare variables within templates and then the content of the variables are automatically detected and can be saved in the database using the CMS.

Using GWT with CMS (like Vosao)

I have a working website built completely with GWT. I want to test it to be used in a CMS; since using a CMS is likely to be the way for easier maintainance in the future instead of having to rewrite code so much.
Here's the reason why I use GWT:
Don't want to write JS code and manipuate pages using JS.
Most importantly I want to reuse my dynamic widgets, like the Flextable I use to populate the products page, instead of dealing with CSS and template (and stuff like that)
Bottleneck with this is that is quite not easy to use with a CMS (like Vosao)
What is the proper strategy on using GWT with a CMS?
When your site begin to grow in size and complexity.
Page counts number in the hundreds, rather than the few.
The CMS begins to become more of an application platform to achieve specific communications and informational objectives.
See this also for more discussions :GWT with a Content Management System

Reporting Engine or Own reports?

My current task is to produce a report on a collection of fairly large linear data set (ie where value 10 depends upon some average factors from 9 8 7 6 5 4 3 etc
The problem also is that this logic (lets call it moving average now) is not fixed and will most probably change. I need to not only generate a report in HTML but in Excel and perhaps email it to use automatically (so some of the variables will be relative, ie generate a report of last month for example)
So my question is should I use a reporting engine or not? (Jasper, Pentaho, Birt)
My drivers here are
-The reporting logic will change, but it will be changed by the developers. It will be complex logic so it will be easiest done in code in Java.
-The report has to be saved and emailed in excel format.
-The reporting task will be huge (some thing where ETL might be helpful)
-Future reporting requirements are not a consideration here, the system will go a rewrite if it needs to be generic and extend-able.
I could just create an entity called report, store its type (an enum) and the parameters list (from the restful URL) and other metardata (who created, what date etc, where to send, and relative parameters are stored) And then when some processing has been done, store it in DB, just to retrieve the processed data for controller to consume. It greatly simplifies the technologies involved (I use spring mvc and it should be enough with a little sprinkle of POI). But I wonder if using reporting engine would be simpler.
My experience with Jasper and Birt (and the commercial Windward Reports) is that they will not help you much with the number crunching part of the report; they are best suited to presenting data that you have already transformed into a suitable structure. Jasper, Birt and Windward Reports can easily handle running totals and averages, but any calculations more complex than that are a real pain (and may be impossible depending on your calculations). I am not familiar with Pentaho.
In your situation I would either implement the calcuations in custom Java code, or in an ETL process.
You could then use a reporting engine to present the results of the calculations in HTML and Excel formats. But if you don't have Jasper or Birt, etc, already integrated into your application then I wouldn't recommend adding one just for this. It would be quicker to manually write out the report data using JSP and POI respectively. Jasper and Birt reports are fairly easy to create, but only once you've got the reporting engine integrated properly!
I've never used Birt, but I have used Jasper, and my one comment would be: using a reporting engine has a learning curve, and adds overhead of it's own. So if you're doing some one-off report, and if the actual report layout is fairly simple, you may not gain a lot from a reporting engine. But, on the flipside, Jasper IS really good at things like letting you write the logic once, then easily generate your report in multiple formats (including Excel).
If there's a strong requirement that the generated report "look pretty" and if it has a really complex layout, and if you need to generate lots of formats, then you may find the reporting engine valuable.
If you can justify spending a couple of hours on it, download Jasper (or Birt or whatever) and run through some of the tutorials / demos and get a feel for it. That'll probably be more valuable to you than all the comments you get here.

GUI for generating XML

Does anybody know of GUIs for generating XMLs? This means the user will not be presented with an IDE with support for XML for him to type XML codes. This would be helpful for non-technical people using the system.
I know this sounds easy, given many libraries that can help in generating XMLs. The issue here is that the schema is really that flexible rather than being straightforward like representing books in a library with their properties.
Imagine HTML, where we can create font tags inside a body, a table, a div, or nested even within itself. The solution is a WYSIWYG application that allows user to generate html codes (XML). However, that is good for XML applied in webpages since they involve visual aspect and design. My application of XML would focus on representing some conceptual and computational definitions, much like sql-like syntax, but more than that.
I'm actually after the approach or previous works done or tried, although having a library/working framework for that would be better. Btw, I'm using Java for this project. Currently, I'm just thinking of presenting element tags where user will be able to drag and drop them and nest them with each other. And perhaps, assist them through forms in inputing values for XML attributes. I'm still hoping if there are better ideas from the community.
Thank you.
I think you need to separate the eventual representation (XML) from the abstraction presented to your users. Is your information presented to the user in tree form? If not, do what is convenient for the users and sweat the XML conversion yourself.
There are many tree-based editors that use "meaningful tiles and icons" instead of XML. For example, look at how Eclipse's plug-in editor does the extension of existing points. You get a tree view and can add properties (typically in a separate group box). But you could write a smarter editor that has everything in the tree.
On the other hand, sometimes the XML representation should really be hidden despite its flexibility. A good example is the plugin.xml for Eclipse-plugins. Look at how the editor for that file looks nothing like XML. It is structured logically for the needs of the user, and the code in the background generates the XML.
I looked for this exact thing a couple of months ago. The only one I found was at http://www.jaxfront.org/pages/. It is Java based.
Note that I ended up going with Actipro Software's SyntaxEditor for .NET WinForms which, although does not give me a GUI, gives the app good IntelliSense-like prompting (derived from an underlying XSD) when editing XML.
The W3C answer to your question is XForms. Unfortunately XForms is not directly supported by browsers, although there is a Mozilla plug-in (show and edit even local files, but only in Mozilla). Many XForms solutions are available, an interesting and free one is XSLTForms (http://sourceforge.net/projects/xsltforms/) which translates XForms into HTML Forms (works with every major browser, but local files can only be shown, not edited due to the limitations of Javascript).
Also take a look on Altova Authentic.
I know it is sometimes hard for non technical people to get familiar with a tool like eclipse, but it comes with very good and easy to use XML editors. Supporting auto-completion, validation, verification. I am not sure if there is a pre configured eclipse derivate which is focused on xml editing, but you could configure such a thing quite easily.

Need help in Architecture design in java

Can anyone help in architecture design of one of my complex application.
Requirement :
In web based application, we need to generate Excel kind of report as HTML page
and after that we need to perform different kinds of operations like
Add manual rows
Delete rows
Edit rows
adding comments based on each cell
viewing the added comments.
attaching the file based on each cell
viewing the attached file.
Collapsible functionality for some of rows
In the process of design we have come up with DB design and application framework is Spring.
and for Web not yet finalized.
what is the best approach to implement this kind of UI?
--JSF?(keep in mind we need to Excel operations like above mentioned operations)
-- Any reporting tool which will provide editing functionality?
Please suggest me How can we do it? and what is the best technology for it? or is there any reporting tools?
Using the JSP displaytag will help in adding/deleting/editing tables like in Excel. A good demo is here http:// demo.raibledesigns.com/appfuse/demos/users-edit.jsp
Not clear about your attaching file usecase - can you elaborate?
try out extjs as your presentation this can be incorporated with struts or spring mvc, it has a very rich UI library which would enable you to do all kind of operations, alternatively you can also use AJAX with DWR, DWR has its own ways of populating the grids and do different operations, GWT, Flex are also some of the product.. i believe it all depends on the comfort level you have with any framework. I am a little oxymoron regarding the use of displaytags at times :-) so often seek for better options.
Sounds like ExtJS (it's a Javascript framework) might work for you. Check out the samples and demos page on their website, especially the Grids. ExtJS Grids offer quite a lot of functionality.

Categories

Resources