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 :-) |
Opinions 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 |
It's supposed to convey a story which is coherent enough for new developer |
11 |
to join into project. Most of other documentation is more useful when |
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, |
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. |
it doesn't exist) but this part is delivered as pure POD for reading pleasure. |
27 |
|
|
28 |
This method is not perfect, and shouldn't be used instead of Jifty models |
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, |
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 |
it's a huge help for complex C<GROUP BY> and C<JOIN> queries which are hard |
31 |
to express using L<Jifty::DBI>. |
to express using L<Jifty::DBI>. |
32 |
|
|
33 |
If we needed to generate those queries from within program (from user data, |
If we needed to generate those queries from within program (from user data, |
35 |
|
|
36 |
=head1 LDAP |
=head1 LDAP |
37 |
|
|
38 |
Implement LDAP entry and edit interface (insteresting problem since most |
Implement LDAP entry and edit interface (interesting problem since most |
39 |
entries can have multiple values which doesn't map nicely to relational |
entries can have multiple values which doesn't map nicely to relational |
40 |
schema). |
schema). |
41 |
|
|
42 |
|
This task can be broken down into following parts: |
43 |
|
|
44 |
=head2 Multiple values |
=head2 Multiple values |
45 |
|
|
46 |
When creating records with ARRAY values C<A3C::Record/create> |
When creating records with ARRAY values L<A3C::Record/create> |
47 |
joins values with magic marker between them to make rest of Jifty happy. |
joins values with magic marker between them to make rest of Jifty happy. |
48 |
|
|
49 |
Plan is to use full-text search engine to search over data anyway, so this |
Plan is to use full-text search engine to search over data anyway, so this |
50 |
is not serious limitation. If needed, something like bitmap indexes could be |
is not serious limitation. If needed, something like bitmap indexes could be |
51 |
used at database level to expose thouse values for filtering. For joins we |
used at database level to expose those values for filtering. For joins we |
52 |
would probably need separate materialized many-many tables which could be |
would probably need separate materialized many-many tables which could be |
53 |
created more-or-less automatically in L<A3C::Record>. |
created more-or-less automatically in L<A3C::Record>. |
54 |
|
|
|
This can in turn be broken down into following tasks: |
|
|
|
|
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 and uses <A3C::LDAP> |
C<bin/import-ldap.pl> has embedded documentation and uses L<A3C::LDAP> |
58 |
|
|
59 |
L<http://a3c.skole.hr/ldap/> is user interface to L<A3C::View::LDAP> and |
L<http://a3c.skole.hr/ldap/> is user interface to L<A3C::View::LDAP> and |
60 |
L<A3C::Action::SyncOrganization> |
L<A3C::Action::SyncOrganization> |
69 |
|
|
70 |
=head2 Create new entries and edit existing ones |
=head2 Create new entries and edit existing ones |
71 |
|
|
72 |
We are in the middle of migaration from (generic) L<A3C::Model::Person> and |
We are in the middle of migration from (generic) L<A3C::Model::Person> and |
73 |
L<A3C::Model::Organization> to our custom L<A3C::Model::hrEduOrg> and |
L<A3C::Model::Organization> to our custom L<A3C::Model::hrEduOrg> and |
74 |
L<A3C::Model::hrEduPerson> |
L<A3C::Model::hrEduPerson> |
75 |
|
|
76 |
Most views I guess, will be implemented by subclassing L<Jifty::View::Declare::CRUD>. |
Most views I guess, will be implemented by sub-classing L<Jifty::View::Declare::CRUD>. |
77 |
Right now L<A3C::View::Organization> is such implementation. |
Right now L<A3C::View::Organization> is such implementation. |
78 |
|
|
79 |
Planned C<A3C::View::hrEduPerson> will implement another such view, and I |
Planned C<A3C::View::hrEduPerson> will implement another such view, and I |
80 |
hope to see some kind of code reuse there (which should probably move to |
hope to see some kind of code reuse there (which should probably move to |
81 |
C<Jifty::Plugin::TableCRUD>. |
C<Jifty::Plugin::TableCRUD>). |
82 |
|
|
83 |
=head2 Virtual LDAP server to publish data |
=head2 Virtual LDAP server to publish data |
84 |
|
|
98 |
|
|
99 |
Configuration files in PHP is only place in which part of portal |
Configuration files in PHP is only place in which part of portal |
100 |
configuration is specified. To handle it in A3C, we use |
configuration is specified. To handle it in A3C, we use |
101 |
L<A3C::Model::StrixInstance> which agregates all instance data. Parser is |
L<A3C::Model::StrixInstance> which aggregates all instance data. Parser is |
102 |
implemented by L<A3C::PHP> |
implemented by L<A3C::PHP> |
103 |
|
|
104 |
=head2 Connect to remote database |
=head2 Connect to remote database |
114 |
C<Strix> (which doesn't link well from on-line documentation so you will |
C<Strix> (which doesn't link well from on-line documentation so you will |
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 reasonable performance. On the other hand, data can be |
118 |
structured usefully, for example trees are structured in useful way for |
structured usefully, for example trees are structured in useful way for |
119 |
direct output to JSON. |
direct output to JSON. |
120 |
|
|
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 |
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. |
C<t/50-strix.t> makes sense, but not more than that. |
126 |
|
|
127 |
=head1 HTML |
=head1 HTML |
128 |
|
|
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 |
157 |
what changed between versions if svn commit log is too detailed allthough |
what changed between versions if svn commit log is too detailed although |
158 |
first line of commit message might be good summary of each individual |
first line of commit message might be good summary of each individual |
159 |
change. |
change. |