Discussion:
[jifty-devel] beginner at jifty needs help finding my way about
William F. Dudley Jr.
2009-06-04 02:23:14 UTC
Permalink
Hi,
I consider myself an experienced developer but am new to jifty, and wanted to
avoid ruby on rails because I already use Perl.

I've fooled around with the tutorials and am trying to build my own application
(the only way I can lear, I'm afraid), and cannot seem to find things in the
documentation, so I thought I'd ask here.

First question:

In one of the tutorials, one creates a lib/MyApp/View.pm, and in there it
says:
# Display each reader in a <dl>.
dl {
dt { }
dd { }
}

I understand what this does, but where is the documentation for the functions
dl(), dt(), and dd() ? Surely there must be other functions to create
other HTML
markup but I can't find them even after browsing the various docs for hours.

Second question:

I've created an App with two tables, one of which has "indices" into the other.

What documents should I be reading to figure out how to search for a record,
or to retrieve a record based on an index or other field in a table? My record
pointers are NOT the native "autoincrement" unsigned int that one
would typically
use, since the application calls for records to have unique identifiers that are
hardware based, sort of like the MAC address on an ethernet interface. So
even though my app will create records 1,2,3,..., they will have unique codes
based on the hardware, which will not, in general, be monotonically increasing
or start with 1.

Thanks in advance,
Bill Dudley
Shawn M Moore
2009-06-04 02:40:50 UTC
Permalink
Hi Bill,
Post by William F. Dudley Jr.
Hi,
I consider myself an experienced developer but am new to jifty, and wanted to
avoid ruby on rails because I already use Perl.
Great. :)
Post by William F. Dudley Jr.
I've fooled around with the tutorials and am trying to build my own application
(the only way I can lear, I'm afraid), and cannot seem to find things in the
documentation, so I thought I'd ask here.
That's fine. Please ask questions, there's no better indicator of where
we need to improve documentation.
Post by William F. Dudley Jr.
In one of the tutorials, one creates a lib/MyApp/View.pm, and in there it
# Display each reader in a <dl>.
dl {
dt { }
dd { }
}
I understand what this does, but where is the documentation for the functions
dl(), dt(), and dd() ? Surely there must be other functions to create
other HTML
markup but I can't find them even after browsing the various docs for hours.
This is Template::Declare code (brought in via "use
Jifty::View::Declare"). Every common (and many uncommon) HTML tag is
exposed to you. The only caveat is that "tr" is "row" and "td" is
"cell". (tr is a special Perl builtin that we can't override)
Post by William F. Dudley Jr.
I've created an App with two tables, one of which has "indices" into the other.
What documents should I be reading to figure out how to search for a record,
or to retrieve a record based on an index or other field in a table?
Our ORM is called Jifty::DBI. The API documentation is available in
Jifty::DBI::Record and Jifty::DBI::Collection. The methods you want to
look at are Record's load_by_cols and Collection's limit.
Post by William F. Dudley Jr.
My record
pointers are NOT the native "autoincrement" unsigned int that one
would typically
use, since the application calls for records to have unique identifiers that are
hardware based, sort of like the MAC address on an ethernet interface. So
even though my app will create records 1,2,3,..., they will have unique codes
based on the hardware, which will not, in general, be monotonically increasing
or start with 1.
Yep, that is fine. You could use something like:

my $computer = MyApp::Model::Computer->new;
$computer->load_by_cols(
MAC => $MAC,
);
Post by William F. Dudley Jr.
Thanks in advance,
Bill Dudley
Enjoy!

Shawn
William F. Dudley Jr.
2009-06-04 03:35:33 UTC
Permalink
Shawn,

Thanks loads, I'm on my way!

Bill Dudley
Post by Shawn M Moore
Hi Bill,
Post by William F. Dudley Jr.
Hi,
I consider myself an experienced developer but am new to jifty, and wanted to
avoid ruby on rails because I already use Perl.
Great. :)
Post by William F. Dudley Jr.
I've fooled around with the tutorials and am trying to build my own application
(the only way I can lear, I'm afraid), and cannot seem to find things in the
documentation, so I thought I'd ask here.
That's fine. Please ask questions, there's no better indicator of where
we need to improve documentation.
Post by William F. Dudley Jr.
In one of the tutorials, one creates a lib/MyApp/View.pm, and in there it
# Display each reader in a <dl>.
dl {
dt { }
dd { }
}
I understand what this does, but where is the documentation for the functions
dl(), dt(), and dd() ? Surely there must be other functions to create
other HTML
markup but I can't find them even after browsing the various docs for hours.
This is Template::Declare code (brought in via "use
Jifty::View::Declare"). Every common (and many uncommon) HTML tag is
exposed to you. The only caveat is that "tr" is "row" and "td" is
"cell". (tr is a special Perl builtin that we can't override)
Post by William F. Dudley Jr.
I've created an App with two tables, one of which has "indices" into the other.
What documents should I be reading to figure out how to search for a record,
or to retrieve a record based on an index or other field in a table?
Our ORM is called Jifty::DBI. The API documentation is available in
Jifty::DBI::Record and Jifty::DBI::Collection. The methods you want to
look at are Record's load_by_cols and Collection's limit.
Post by William F. Dudley Jr.
My record
pointers are NOT the native "autoincrement" unsigned int that one
would typically
use, since the application calls for records to have unique identifiers that are
hardware based, sort of like the MAC address on an ethernet interface. So
even though my app will create records 1,2,3,..., they will have unique codes
based on the hardware, which will not, in general, be monotonically increasing
or start with 1.
my $computer = MyApp::Model::Computer->new;
$computer->load_by_cols(
MAC => $MAC,
);
Post by William F. Dudley Jr.
Thanks in advance,
Bill Dudley
Enjoy!
Shawn
_______________________________________________
jifty-devel mailing list
http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
Loading...