/[A3C]/lib/A3C.pod
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C.pod

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 204 by dpavlin, Thu Jun 19 18:24:02 2008 UTC revision 208 by dpavlin, Thu Jun 19 21:24:26 2008 UTC
# Line 4  A3C = AAAC; AAA from "Authentication, Au Line 4  A3C = AAAC; AAA from "Authentication, Au
4    
5  =head1 DESCRIPTION  =head1 DESCRIPTION
6    
7  This page describes general idea about A3C application and current status of implementation  This page describes general idea about A3C application and current status of implementation.
8    
9    Oppinions should be attributed to Dobrica Pavlinusic, and not other developers :-)
10    It's surposed to convey a story which is coherent enough for new developer
11    to join into project. Most of other documentation is more useful when
12    developing and looking into code usage (if it's not documented and tested,
13    it doesn't exist) but this part is delivered as pure POD for reading pleasure.
14    
15    =head1 Models
16    
17    Models in Jifty are at perl level objects (with validation and
18    canonicalization) and tables in database.
19    
20    For a start, we implement some magic documented in L<A3C::Record> on records
21    (rows in database).
22    
23    Then, we need to mungle data without re-thinking SQL queries which would
24    produce same results, so there is L<A3C::SQL> which produce objects that
25    look like L<Jifty::Collection>s, but aren't. This allows us to switch into
26    SQL in views if needed.
27    
28    This method is not perfect, and shouldn't be used instead of Jifty models
29    just to write SQL because it doesn't do any permission checking. However,
30    it's a huge help for compex C<GROUP BY> and C<JOIN> queries which are hard
31    to express using L<Jifty::DBI>.
32    
33    If we needed to generate those queries from within program (from user data,
34    for example) something like L<Fey::SQL> would be much better tool.
35    
36  =head1 LDAP  =head1 LDAP
37    
38  Implement LDAP entry and edit interface (insteresting problem since most  Implement LDAP entry and edit interface (insteresting problem since most
39  values can have multiple entries which doesn't map nicely to relational  entries can have multiple values which doesn't map nicely to relational
40  schema)  schema).
41    
42    =head2 Multiple values
43    
44    When creating records with ARRAY values C<A3C::Record/create>
45    joins values with magic marker between them to make rest of Jifty happy.
46    
47    Plan is to use full-text search engine to search over data anyway, so this
48    is not serious limitation. If needed, something like bitmap indexes could be
49    used at database level to expose thouse values for filtering. For joins we
50    would probably need separate materialized many-many tables which could be
51    created more-or-less automatically in L<A3C::Record>.
52    
53  This can in turn be broken down into following tasks:  This can in turn be broken down into following tasks:
54    
55  =head2 Import data from existing LDAP server  =head2 Import data from existing LDAP server
56    
57  C<bin/import-ldap.pl> has embedded documentation  C<bin/import-ldap.pl> has embedded documentation and uses <A3C::LDAP>
58    
59    L<http://a3c.skole.hr/ldap/> is user interface to L<A3C::View::LDAP> and
60    L<A3C::Action::SyncOrganization>
61    
62  =head2 Query existing LDAP server  =head2 Query existing LDAP server
63    
# Line 74  C<Strix> (which doesn't link well from o Line 115  C<Strix> (which doesn't link well from o
115  have to take a look in C<lib/Strix.pm>) implements pure DBI code (ported  have to take a look in C<lib/Strix.pm>) implements pure DBI code (ported
116  from php) to access data directly. Keep in mind that this data have to be  from php) to access data directly. Keep in mind that this data have to be
117  cached for any resonable performance. On the other hand, data can be  cached for any resonable performance. On the other hand, data can be
118  structured usefully, for example trees are structured in useful way for JSON  structured usefully, for example trees are structured in useful way for
119  direct JSON output.  direct output to JSON.
120    
121  If tree has C<class> key, it can be set to C<error> so that we can mark  If tree has C<class> key, it can be set to C<error> so that we can mark
122  errors in data using same CSS class in views. This might be useful convention.  errors in data using same CSS class in views. This might be useful convention.
123    
124    I prefer to keep this file documented up to level that make it's usage from Jifty and
125    C<t/50-strix.t> makes sanse, but not more than that.
126    
127  =head1 HTML  =head1 HTML
128    
129  We don't generate HTML using templates. In fact, all HTML is encoded in perl  We don't generate HTML using templates. In fact, all HTML is encoded in perl
# Line 91  It should probably be split into several Line 135  It should probably be split into several
135  for us anyway) for easier maintenance, probably by same logic as view names  for us anyway) for easier maintenance, probably by same logic as view names
136  to skip additional step of mapping when human are watching into code.  to skip additional step of mapping when human are watching into code.
137    
138    In long run, this should allow us to refactor templates at code level and
139    create different re-usable widgets which brings us to following topic...
140    
141    =head1 AJAX
142    
143    Jifty's way of AJAX are L<Jifty::Manual::PageRegions>.
144    
145    =head2 Strix navigation
146    
147    L<http://a3c.skole.hr/strix/navigation>
148    
149    For now, we have implementation of two-level select which is in sync with
150    instance clipboard (implemented by L<A3C::Model::StrixInstanceSelection> and
151    L<A3C::View::Strix> and L<A3C::Action::StrixSelectSite>. This is
152    good candidate to refactor into reusable widget on it's own.
153    
154  =head1 BUGS  =head1 BUGS
155    
156  Many probably, documented in C<TODO> which is also useful for quick overview  Many probably, documented in C<TODO> which is also useful for quick overview

Legend:
Removed from v.204  
changed lines
  Added in v.208

  ViewVC Help
Powered by ViewVC 1.1.26