SAMLogin for Joomla! Saturday, November 9, 2013 Labels: , , , , , I released a brand new extension to implement SAML (SSO) in Joomla 2.5/3+ Check it out at: http://creativeprogramming.it/it/apps/joomla-extensions/item/54-samlogin-for-joomla-2-5-3-x-released creativeprogramming.it new blog Tuesday, November 24, 2009 http://www.creativeprogramming.it/blogs/wp/ Joomla SAML2 Auth Extension Friday, September 25, 2009 Labels: , , , , , , , , , I'm glad to annunce the opening of my first owned open source project:


SAML2 authentication for Joomla! A Joomla extension to support saml2 based SSO systems integrating simpleSAMLphp in joomla.








For use it in production you need only to install a component ad a plugin, and configure it with a web ui.

You can download it at: http://dev.garr.it/idemauth/
Videotutorial - How to install a SAML2 SP 15 minutes : http://dev.garr.it/idemauth/SPin15mins/15mins.html
You can aslo join the open source project on Kenai (i'm open to anyone): http://kenai.com/projects/idemauth



Stefano Gargiulo.
VideoTutorial -- How to get your first java application on GoogleAppEngine (with persistence!) Tuesday, September 1, 2009 Labels: , , , This video tutorial is a straightforward way to getting started with google app engine java development.

It's an "hello world" application with a java persiscence (OR/M) demo.

"terrific"!



2.0 developer life it's easy..
enjoy again! 2.0 Amazing tools: Creating facebook applications with Zembly and integrating them in external java webapps with ZCL gateway Sunday, August 30, 2009 Labels: , , , , , , , , , Developers 2.0 have an easy life, open source communities are revolutionating the way of writing code: incapusulation of complexity is the key, sharing knowledge is the engine!

Then how to write an amazing Facebook extension for your java web-application and get more people to your 2.0 app?
it's Simple, incapsulate Facebook Apps complexity in Zembly, then incapsulate Zembly complexity in ZCL, then use ZCL in your app!

But what's Zembly? Zembly is a wonderfull idea: an all-in-browser social development environment in wich you can create applications for social networks using a set of APIs, code-editors, and re-using and customizing community developed widgets (that's the magic: in Zembly open source is mandatory!!!)

Zembly features:

Bring your creativity, bring your skills, bring your friends

* Browser-based: Do everything in your browser. No downloads or installs.
* Social programming: Create apps socially with other users, and reuse pieces and parts that they create. You choose the level of collaboration, from keeping everything private to making your app public and open source. We call it social programming.
* Social networking: Connect with other zembly developers, watch their activity feeds, and send them messages. Be an expert, or get to know one, while working side-by-side with people in your social graph.
* Templates: Community-provided templates let you create a useful application with a click. Even after you've created your application, it remains a template that you can easily customize with its graphical customization page. When you're ready, you can choose to customize every aspect of your application with zembly's IDE-class editor.
* Cloning: Find an application or widget you like in zembly and clone it to make it your own, subject to the original author's permission of course.
* IDE-class editor: When you want absolute control, use zembly's exclusive IDE-class editor to tweak any aspect of your app. Features like full syntax highlighting, error annotations, code completion, and automatic formatting and full language support for HTML, CSS, JavaScript, FBML, and FBJS give you all the power you need to make advanced changes your application.
* Programming model: zembly makes consuming popular web APIs like Yahoo, Google, Flickr, Amazon, Twitter, YouTube, Dapper, and more trivially easy, with a single line of code. zembly's philosophy is that the web is your library.
* BYOAPI: Have your own server or API? Describe it to zembly and then call it from your app. Or, publish your API to other zembly users and let them call it from their apps. zembly can make just about any RESTful API easy callable from your app with a single line of code. You can call APIs outside of zembly from your Java or JavaFx application.
* Built-in hosting: Not only is zembly the fastest and easiest way to create your application, it's the fastest and easiest way to deploy it. Click the publish button and your app just runs. Best of all, zembly apps elastically scale on Sun's cloud infrastructure so you don't need to worry about creating or maxing our your own datacenter.



yes, you've read correct: Zembly is aslo a free hosting service for Facebook apps (and not only Facebook apps..)

Oh i'm loving my work, and i'm loving my Era: open source is the new kind of freedom!!!

But stop phyloshopying, let's get concrete:

here there are the Zembly-Facebook how-tos (videotutorials)









and here there is the ZCL (Zembly Client Libary) - Java how-to:

http://kenai.com/projects/zcl/pages/GettingStartedGuide
http://kenai.com/projects/zcl/pages/Home

then what other i can say??

Eeeenjoooy! PostgreSQL serial vs. MySQL auto_increment vs. Oracle sequence Friday, August 21, 2009 Labels: , , , , , ,
This article moved here: http://creativeprogramming.it/it/knowshare/devs/item/55-postgresql-serial-vs-mysql-auto-increment-vs-oracle-sequence
In PostgreSQL integer counters are more advanced than the MySQL auto_increments:

Them are sequences (like in Oracle) this mean that them can be used like "shared counters in the db" (very usefull in my opinion to implement a global object id between tables and can be usefull aslo in class table inheritance implementations)

This powerfull strument is a little boring to implement in Oracle:

you need to create the sequence:
create table mytable (id number,txt varchar(255));

create sequence mytable_seq
start with 1
increment by 1
nomaxvalue; 

and to associate it to the column inserts with a trigger:
create trigger mytable_seq_trigger
before insert on test
for each row
begin
select mytable_seq.nextval into :new.id from dual;
end;

or instead of the trigger you can simply hardcode sequence next value call into insert statments:
insert into mytable values(mytable_seq.nextval, 'yes but who does 
hardcoded inserts today?');

but i think the best way to do this in Oracle is the following:
create table mytable (id number default mytable_seq.nextval,
 txt varchar(255));

in this way you emulate the mysql way, that's usefull too: infact in this way if you want, you can specify the id value in an insert query or get the magic just not providing any value for the id in the insert query.

this method is also the PostgreSQL's one, infact postgre combine the simplicty and comfort of MySQL auto_increments with the power of Oracle sequences:

how to declare auto_increment in postgre:
create table mytable (id serial, name chararter varying(255));

that's all!

but "serial" is just a shortcut-keyword: this is the real auto generated sql code :
CREATE SEQUENCE inscritto_column_seq
  INCREMENT 1
  MINVALUE 1
  MAXVALUE 9223372036854775807
  START 1
  CACHE 1;
ALTER TABLE inscritto_column_seq OWNER TO rdbapp;

and
ALTER TABLE mytable ALTER COLUMN id
        SET DEFAULT nextval('mytable_column_seq'::regclass); 

(i think in MySQL too happen a thing of this type, but the difference is that in PostgreSQL you can create and manage manually sequences like in Oracle, and take advantage of them power... for instance think at how easy and secure can be getting the last_insert_id of a table: select currval('ente_column_seq'::regclass); )

but attention, in Postgre you got an error when try to change an integer column to serial:
create table mytable (id integer, name chararter varying(255));


alter table mytable alter column id type serial; 
(ERROR: Type serial does not exist)

this can be an issue?

uhm.. no! that's how to alter integer to sequences in postgre:
CREATE SEQUENCE mytable_id_seq
        INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1;
    ALTER TABLE test_table ALTER COLUMN test_column
        SET DEFAULT nextval('mytable_id_seq'::regclass); 

Note: if you have data in the table, instead of
MINVALUE 1
use the value returned form this query:
select max(id) from mytable;
GWT-Ext -- How to programmatically swap themes Wednesday, August 19, 2009 Labels: , , , , , This is the source code of the nice combobox used for live changing the css theme in the gwtext demo showcase (http://www.gwt-ext.com/demo/)


public class ThemeChanger extends ComboBox {

public ThemeChanger() {

final Store store = new SimpleStore(new String[]{"theme", "label"}, new Object[][]{
new Object[]{"themes/green/css/xtheme-green.css", "Green"},
new Object[]{"themes/slate/css/xtheme-slate.css", "Slate"},
new Object[]{"js/ext/resources/css/xtheme-gray.css", "Gray"},
new Object[]{"xtheme-default.css", "Aero Glass"},
new Object[]{"themes/indigo/css/xtheme-indigo.css", "Indigo"},
new Object[]{"themes/silverCherry/css/xtheme-silverCherry.css", "Silver Cherry"}
});

store.load();

setFieldLabel("Select Theme");
setEditable(false);
setStore(store);
setDisplayField("label");
setForceSelection(true);
setTriggerAction(ComboBox.ALL);
setValue("Green");
setFieldLabel("Switch theme");
addListener(new ComboBoxListenerAdapter() {
public void onSelect(ComboBox comboBox, Record record, int index) {
String theme = record.getAsString("theme");
CSS.swapStyleSheet("theme", theme);
}
});
setWidth(100);
}
}




don't forget to add the related css includes in the GWT.xml file:

 
js/ext/resources/css/form.css
js/ext/resources/css/ext-all.css
js/ext/resources/css/xtheme-gray.css
js/ext/resources/css/xtheme-xxx ecc...

Older Posts
One time here there was our very old blog
We moved! Check us at creativeprogramming.it