Friday, December 16, 2011

First step with Entando


The new version of Entando is out and as reported in the following post "Enter Maven and GitHub"   mMven and GitHub are used.

mmm ... Maven?
question: how do I install / use the new version of Entando?
answer: ?????

So I started studying a bit of Maven, read the blog posts, wikis, tested,...

So the result is I can install and deploy a portal based on Entando in a few minutes
prerequisites:
  java, postgresql, tomcat are all present on the PC.
  a postgresql user agile with password agile is configured .
Steps:
1. Install maven
2. open a terminal
3. create a directory for the project you want to create
3. cd into the directory you just created
4. type mvn archetype: generate-Dfilter = entando
5. answer the following questions:
5.1 Choose archetype:
1: remote -> org.entando.entando: entando-archetype-plugin-generic (Generic Archetype Plugin for Entando: an agile, modern and user-centric open source portal platform.)
2: remote -> org.entando.entando: entando-generic-portal-archetype (Archetype for Entando Generic Portal: an agile, modern and user-centric open source portal platform.)
Choose a number or apply filter (format: [groupId:] artifactId, contains case sensitive):
choose 2

Choose org.entando.entando: entando-portal-archetype-generic version:
1: 2.4.0.1
2: 2.4.0
Choose a number: 2:
choose 1 [the list of version may differ we're now on version 4.0]
Define value for property 'groupId':: it.testentando
Define value for property 'artifactId':: testentando
Define value for property 'version': 1.0-SNAPSHOT: (accept default)
Define value for property 'package': it.testentando: (accept default)
displays the list of choices if you run press Y otherwise press N and repeat from step 5.1
That's all now we have a folder containing the created project (in this case testentando).
6.Populate the db
6.1 Configure the buildProperties.xml for your Operatin System
6.2 open a  terminal and type
cd testentando
ant  PG-db-full-update 
This step is not required , no postgres is require for the first run.

7. last step:
in the folder src/main/filters check the properties file to ensure that the configurations of Tomcat and the postgresql password is correct (in case you doesn't use agile/agile).

Now you're ready to start the portal.
  mvn clean jetty:run 

http://localhost:8080/testentando/

et voilĂ  Entando is running

Links:
            The Entando wiki on GitHub
            Entando download





Wednesday, December 14, 2011

Replication stars

Datacharmer post:
Working with replication, you come across many topologies, some of them sound and established, some of them less so, and some of them still in the realm of the hopeless wishes. I have been working with replication for almost 10 years now, and my wish list grew quite big during this time. In the last 12 months, though, while working at Continuent, some of the topologies that I wanted to work with have moved from the cloud of wishful thinking to the firm land of things that happen. My quest for star replication starts with the most common topology. One master, many slaves (...)

Monday, December 12, 2011

Pentaho Dynamic setting Y-Axis


Working on Entando / Pentaho integration, one of the customer request was :
"I needed to be able to change the minimum and maximum Y-axis at run time."

  • Below the solution I've used:
  • create reports
  • insert the chart
  • open the properties window
  • in the scripting language choose BeanShell
  • insert the following script

"
import org.jfree.chart.*;
import org.jfree.chart.axis.NumberAxis;
import java.lang.Double;
data = runtime.getData();
minVal =999999.0;
maxVal = 0.0;
for (int i=0;i latteProd = data.getValueAt(i,2);
if(latteProd < minVal){
minVal = latteProd;
}
if(latteProd > maxVal){
maxVal = latteProd;
}
}
xyPlot = chart.getPlot();
NumberAxis domain = (NumberAxis) xyPlot.getRangeAxis();
domain.setRange((minVal - (minVal*.10)), (maxVal+ (maxVal*.10)));
"


Wednesday, November 23, 2011

Automating iOS Application Testing: Under the Hood, Capturing and Recording Events

Stu Stern post on drdobbs.com
"Recording UI events for playback means filtering thousands of data points and condensing them into a single action. With iOS, this can be done with swizziling and other unusual language features of Objective-C."


Read more on drdobbs.com

Tuesday, November 15, 2011

Dr Dobb's - Fast XML Parsing in Ruby

Sometimes the fastest way to parse a known XML stream is to write your own lean parser. Even in Ruby, this gives remarkable performance benefits.


Most programming languages have their own XML parser libraries. And many of those use the DOM (Document Object Model) API. DOM is good for general-purpose XML processing: The input is parsed into a tree structure that can be modified and written back out. Often whitespace is preserved so the output is identical to the input if it is not modified. This generality comes at a cost: large memory requirements (often more than double the input size) and slow read and write. For applications that read the XML data for only specific pieces of information, there are better alternatives.


Full post on Dr Dobb's