Links

   Quran Explorer - Interactive Audio Recitations & Translations

Tuesday, May 28, 2013

A Plus: School Management System


Behold

The smartest, boldest and state-of-the-art Management System for Academic Institutions is here at last.

Accessible from Desktop, Browser and Mobile this is surely the best to invest in...

A system that integrates SMS & Email messaging plus Intelligent Reporting is what you need and nothing less...

A + School / College Information System from Mabura Ze Guru on Vimeo.



Screenshots for the impatient



Admission process begins here










Sample Output (Printable Report)










Capturing Exam Results is a breeze










And its nice-looking tooooo.... (looks exactly the same way in desktop and browser)

Core Modules:

a. Academics - includes Exams, Timetabling, Performance Statistics
b. Library
c. Boarding
d. Procurement
e. Finance and Accounts
f.  Banking - deposits, withdrawals, transfers and reconciliation
g. Messaging(SMS & Email) - optional plugin
h. Reporting and Analysis - Adhoc, printable and Exportable reports and charts

Part One

Contact the creators for more; Sesame Technologies

This Is Society

My two cents.... on social life
(Attn Nerds and Geeks)
Imagine three people naked and separate in the woods.  They have nothing with them, no one with them, no starting point.

One recognizes his coldness and gathers wood, and struggles for a spark, until he has a fire.
Another recognizes her hunger, sharpens a rock, and kills an animal for food.
A third recognizes his thirst, and searches far and wide for water, until he finds a spring.

The first is warm, but dies of thirst.  The second is full, but dies of exposure.  The third is slaked, but dies of starvation.

But if instead the three meet, and recognize what each the other can bring, what each the other needs, and what they themselves have and need, they can share one to the other and live.  The water carrier is fed, the hunter is warm, the fire-builder does not thirst: this is society



Artical inspired by/copied from http://alittlewideeyed.blogspot.com

Thursday, May 23, 2013

JSF Action vs ActionListener

96 down vote accepted

Following is the difference btwn Action and ActionListener in JSF

actionListener

Use actionListener if you want have a hook before the real business action get executed, e.g. to log it, and/or to set an additional property (by ), and/or to have access to the component which invoked the action (which is available by ActionEvent argument). The actionListener method has by default the following signature:
import javax.faces.event.ActionEvent;
// ...

public void actionListener(ActionEvent event) {
    // ...
}
Note that you can't pass additional arguments by EL 2.2. You can however override the ActionEvent argument altogether by passing and specifying custom argument(s). The following examples are valid:
actionListener="#{bean.methodWithoutArguments()}" 
actionListener="#{bean.methodWithOneArgument(arg1)}" 
actionListener="#{bean.methodWithTwoArguments(arg1, arg2)}" 
(note the importance of the parentheses in the argumentless method, if they were absent, JSF would still expect a method with ActionEvent argument)

action

Use action if you want to execute a business action and if necessary handle navigation. The action method can return a String which will be used as navigation case outcome (the target view). A return value of null or void will let it return to the same page. A return value of empty string or the same view ID will also return to the same page, but destroy any view scoped beans. The action method can be any valid MethodExpression, also the ones which uses EL 2.2 arguments, e.g:
 value="submit" action="#{bean.edit(item)}" />
with
public void edit(Item item) {
    // ...
}
Note that when your action method solely returns a string, then you can also just specify exactly that string in the action attribute.
E.g. this is totally clumsy:
 value="Go to next page" action="#{bean.goToNextpage}" />
with
public String goToNextpage() {
    return "nextpage";
}
Instead just do
 value="Go to next page" action="nexpage" />
Please note that this in turn indicates a bad design: navigating by POST. This is not user nor SEO friendly. This all is explained in When should I use h:outputLink instead of h:commandLink? and is supposed to be solved as
 value="Go to next page" outcome="nextpage" />

Invocation order

The actionListeners are always invoked before the action in the same order as they are been declared in the view and attached to the component. So, the following example
 value="submit" actionListener="#{bean.listener1}" action="#{bean.submit}">
     type="com.example.SomeActionListener" />
     target="#{bean.property}" value="some" />
will invoke Bean#listener1(), SomeActionListener#processAction(), Bean#setProperty() and Bean#submit() in this order.

Exception handling

The actionListener supports a special exception: AbortProcessingException. If this exception is thrown from an actionListener method, then JSF will skip any remaining action listeners and the action method and proceed to render response directly. You won't see an error/exception page, JSF will however log it. If you intend to block the page by an error page as result of a business exception, you should be performing the job in the action method.

 DISCLAIMER: I dont take any credit for this explanation. (because it was 'shamelessly' copied from BalusC's answer at Stack Overflow)

Tuesday, May 7, 2013

ER diagram from an existing ORACLE DB

In SQL Developer 3, this is very straight forward;

View > Data Modeler > Browser.

The browser will show up as one of the tabs along the left-hand side.
Click on the Browser tab, expand the design, right-click Relational Models and select 'New Relational Model'.
Then just drag the tables you want onto the model.

To save/export the diagram to a PDF do;

File > Data Modeler > Print Diagram > PDF

Follow instructions to finish

happy modelling

Monday, May 6, 2013

Friday, May 3, 2013

TRUE/REAL data pagination


I was recently implementing Lazy Loading in Primefaces

One of the insights i would like to share is that real efficient pagination is achieved by fetching data from the database (backend) in chunks as opposed to loading everything in memory.

This saves both bandwidth and memory (client side).

The trick here is to use OFFSET and LIMIT sql clauses in conjuction with ORDER BY.

Example 1: Returning the first 100 rows from a table called employee:

SELECT employee_id, employee_name, remarks FROM employee ORDER BY employee_id ASC LIMIT 100;

Example 2: Returning 10 rows from the table employee starting at row 15

SELECT employee_id, employee_name, remarks FROM employee ORDER BY employee_id ASC OFFSET 15 LIMIT 10;