Browse Source

some more info on what is going on

themage
Marco Neves 7 years ago
parent
commit
44014a561f
1 changed files with 104 additions and 1 deletions
  1. 104 1
      README.pod

+ 104 - 1
README.pod

@ -5,7 +5,105 @@ oSMo (oSocial Mojolicious) is a framework writen over Mojolicious,
5 5
extending Mojolicious with the functionality need to implement simple
6 6
and fast a social website.
7 7
8
=head2 Features
8
=head2 Documentation
9
10
I know, I know - I will get there.
11
12
=head2 So Far
13
14
So far oSMo is mostly adding functionality to Mojolicious, assuming some
15
basic functionality will be used most of the time. The basic infrastructure
16
for authentication and logging as described in the edeas below is already in
17
place, even if most of the final implementations are not yet final.
18
19
At this point oSMo makes it really easy to create sites that use
20
bootstrap as a design framework, but it doesn't need to be used and can
21
be easily replaced by creating a small set of templates in your app
22
that you'ld need to create anyway with Mojolicious.
23
24
In theory everything you can do with Mojo should work with oSMo, and you
25
get a few new things.
26
27
=head2 Working already
28
29
=over 2
30
31
=item Templates and Themes
32
33
Mojolicious template system is really nice, and the only change made on
34
it was the support for themes - sometimes you may want to make a website
35
that used different themes for different <conditions> - the only condition
36
is that when you get to the rendering the themes is already defined,
37
the conditions you use to define your themes are your problem.
38
39
oSMo will look for the right template first in the theme directory
40
and then in the main templates directory. The themes may also have their
41
special version of the public files - if your theme only need
42
a different css file, it may only have the new css, with the same name as
43
the file in the main public directory, and that it, you have a new look for
44
your site.
45
46
=item Authentication
47
48
oSMo, with auth activated, adds some helpers, conditions and predefined
49
routes to your Mojo website.
50
51
=over 2
52
53
=item helper
54
55
oSMo adds the helpers authed(), anonymous(), user_can('permission') and
56
auth_form() - this can be used in your controlers or templates.
57
58
=item conditions
59
60
oSMo also adds the conditions authed_user, anonym_user and user_can
61
conditions, that you can use when defining your routes.
62
63
=item base routes
64
65
But you can also use $app->auth->anonymous_routes or
66
$app->auth->authed_routes as base for your routes for anonymous or
67
authenticated users.
68
69
=back
70
71
oSMo::Auth is also plugable, and you can define your own authentication
72
plugins for it. Unless you need a register page, you don't even need to create
73
any page to make your authentication work - just a list of fields you need
74
on login and a check_user method to verify the credential.
75
76
Some Authentication systems may need some more complex logic - and it's 
77
part of the plan to support oAuth, Open ID, Facebook and some others
78
on the framework itself.
79
80
=item Menus and Snippets
81
82
Most website have menus, and often enough we need to add small snippets of
83
html/js/css to our pages depending on conditions - and that shouldn't mean
84
we need a completly new template to have those. oSMo have support to define
85
both.
86
87
=item Form Validation
88
89
Validating forms is always needed - this is still a WIP, but the bases for it
90
are already here.
91
92
=item Email
93
94
Because it was needed for the Email Registering and Authentication, and most
95
sites like to send emails - if nothing else from the contact us form to the
96
site owner.
97
98
=item Sessions
99
100
Because sessions should be server side - I think, not client side. We just
101
send a session Id to the user, taking advantage of Mojo::Session, and keep
102
everything else server side.
103
104
=back
105
106
=head2 Ideas
9 107
10 108
=over 2
11 109
@ -38,6 +136,11 @@ a lot more than that is needed. oSMo replaces the Mojolicious log system
38 136
with its own, in order to add a few more functionalities to it, and make
39 137
it more pluggable on how the log are saved and what gets logged.
40 138
139
=item Localization
140
141
Because if your site gets interesting, it will most likely need it.
142
143
=back
41 144
42 145
=head2 Instalation
43 146