source: main/trunk/greenstone2/perllib/cpan/Mojolicious/Guides.pod@ 32205

Last change on this file since 32205 was 32205, checked in by ak19, 6 years ago

First set of commits to do with implementing the new 'paged_html' output option of PDFPlugin that uses using xpdftools' new pdftohtml. So far tested only on Linux (64 bit), but things work there so I'm optimistically committing the changes since they work. 2. Committing the pre-built Linux binaries of XPDFtools for both 32 and 64 bit built by the XPDF group. 2. To use the correct bitness variant of xpdftools, setup.bash now exports the BITNESS env var, consulted by gsConvert.pl. 3. All the perl code changes to do with using xpdf tools' pdftohtml to generate paged_html and feed it in the desired form into GS(3): gsConvert.pl, PDFPlugin.pm and its parent ConvertBinaryPFile.pm have been modified to make it all work. xpdftools' pdftohtml generates a folder containing an html file and a screenshot for each page in a PDF (as well as an index.html linking to each page's html). However, we want a single html file that contains each individual 'page' html's content in a div, and need to do some further HTML style, attribute and structure modifications to massage the xpdftool output to what we want for GS. In order to parse and manipulate the HTML 'DOM' to do this, we're using the Mojo::DOM package that Dr Bainbridge found and which he's compiled up. Mojo::DOM is therefore also committed in this revision. Some further changes and some display fixes are required, but need to check with the others about that.

File size: 10.6 KB
Line 
1
2=encoding utf8
3
4=head1 NAME
5
6Mojolicious::Guides - The Mojolicious Guide to the Galaxy
7
8=head1 DON'T PANIC!
9
10We are constantly working on new documentation. Follow us on
11L<GitHub|http://github.com/kraih/mojo> or join the official IRC channel C<#mojo>
12on C<irc.perl.org> to get all the latest updates.
13
14=head1 BASICS
15
16=over 2
17
18=item Learning Perl
19
20If you are new to Perl, we recommend
21L<Learn Perl in 2 hours 30 minutes|http://qntm.org/files/perl/perl.html> for a
22quick introduction, or the
23L<Modern Perl book|https://pragprog.com/book/swperl/modern-perl-fourth-edition>,
24freely available in many formats. Both are excellent introductions to the
25language. For more books and documentation, check out
26L<learn.perl.org|http://learn.perl.org/>.
27
28=item Learning Web Technologies
29
30All web development starts with HTML, CSS and JavaScript, to learn the basics
31we recommend the
32L<Mozilla Developer Network|https://developer.mozilla.org/en-US/docs/Web>. And
33if you want to know more about how browsers and web servers actually
34communicate, there's also a very nice introduction to
35L<HTTP|https://developer.mozilla.org/en-US/docs/Web/HTTP>.
36
37=back
38
39=head1 CONVENTIONS
40
41=over 2
42
43=item Modern Perl
44
45L<Mojolicious> uses a modern subset of Perl exclusively, and therefore all
46documentation assumes that L<strict>, L<warnings>, L<utf8> and Perl 5.10
47L<features|feature> are enabled, even if examples don't specifically mention it.
48
49 use strict;
50 use warnings;
51 use utf8;
52 use feature ':5.10';
53
54Some modules, like L<Mojo::Base> and L<Mojolicious::Lite>, will enable them for
55you automatically, whenever they are used.
56
57=back
58
59=head1 TUTORIAL
60
61=over 2
62
63=item L<Mojolicious::Guides::Tutorial>
64
65A fast and fun way to get started developing web applications with
66L<Mojolicious>. The tutorial introduces the L<Mojolicious::Lite> micro web
67framework, which is only a thin wrapper around the full web framework. The
68simplified notation introduced in the tutorial is commonly used throughout the
69guides and is therefore considered a prerequisite, you should definitely take a
70look!
71
72=back
73
74=head1 GUIDES
75
76=over 2
77
78=item L<Mojolicious::Guides::Growing>
79
80Starting a L<Mojolicious::Lite> prototype from scratch and growing it into a
81well-structured L<Mojolicious> application.
82
83=item L<Mojolicious::Guides::Routing>
84
85Simple and fun introduction to the L<Mojolicious> router.
86
87=item L<Mojolicious::Guides::Rendering>
88
89Generating content with the L<Mojolicious> renderer.
90
91=item L<Mojolicious::Guides::Testing>
92
93Powerful yet elegant testing techniques and tools for L<Mojolicious> and other
94web applications.
95
96=item L<Mojolicious::Guides::Cookbook>
97
98Cooking with L<Mojolicious>, recipes for every taste.
99
100=item L<Mojolicious::Guides::Contributing>
101
102Become a part of the ongoing L<Mojolicious> development.
103
104=item L<Mojolicious::Guides::FAQ>
105
106Answers to the most frequently asked questions.
107
108=back
109
110=head1 HIGHLIGHTS
111
112L<Mojolicious> and L<Mojolicious::Lite> are the sum of many parts, built on top
113of the L<Mojo> web development toolkit. Small building blocks that can be used
114independently for all kinds of applications, these are the most prominent ones.
115
116=over 2
117
118=item L<Mojo::UserAgent>
119
120Full featured non-blocking I/O HTTP and WebSocket user agent.
121
122=item L<Mojo::DOM>
123
124Very fun and minimalistic HTML/XML DOM parser with CSS selector support.
125
126=item L<Mojo::JSON>
127
128Minimalistic JSON implementation that just works.
129
130=item L<Mojo::Server::Daemon>
131
132Full featured, highly portable non-blocking I/O HTTP and WebSocket server, with
133self-restart support through L<Mojo::Server::Morbo>, perfect for development
134and testing.
135
136=item L<Mojo::Server::Prefork>
137
138Full featured, UNIX optimized, preforking non-blocking I/O HTTP and WebSocket
139server with support for zero downtime software upgrades (hot deployment)
140through L<Mojo::Server::Hypnotoad>.
141
142=item L<Mojo::Server::CGI>, L<Mojo::Server::PSGI>
143
144Transparent CGI and L<PSGI> support out of the box.
145
146=item L<Mojo::IOLoop>
147
148A minimalistic event loop with support for multiple reactor backends.
149
150=item L<Mojo::Template>
151
152Very Perl-ish and minimalistic template system.
153
154=item L<Test::Mojo>
155
156Testing toolkit for web applications.
157
158=item L<ojo>
159
160Fun one-liners using everything above.
161
162=back
163
164=head1 SPIN-OFFS
165
166These modules are not part of the L<Mojolicious> distribution, but have been
167designed to be used with it and are being developed under the same umbrella.
168
169=over 2
170
171=item L<Mojo::Pg>
172
173A tiny wrapper around L<DBD::Pg> that makes
174L<PostgreSQL|http://www.postgresql.org> a lot of fun to use with
175L<Mojolicious>. Perform queries blocking and non-blocking, use all
176L<SQL features|https://www.postgresql.org/docs/current/static/sql.html>
177PostgreSQL has to offer, generate CRUD queries from data structures, manage your
178database schema with migrations and build scalable real-time web applications
179with the publish/subscribe pattern.
180
181And it comes with two great
182L<example applications|https://github.com/kraih/mojo-pg/tree/master/examples/>
183you can use for inspiration. The minimal
184L<chat|https://github.com/kraih/mojo-pg/tree/master/examples/chat.pl>
185application will show you how to scale WebSockets to multiple servers, and the
186well-structured
187L<blog|https://github.com/kraih/mojo-pg/tree/master/examples/blog> application
188how to apply the MVC design pattern in practice.
189
190=item L<Minion>
191
192A full featured job queue for L<Mojolicious> with support for multiple backends
193(such as L<PostgreSQL|http://www.postgresql.org>). Job queues allow you to
194process time and/or computationally intensive tasks in background processes,
195outside of the request/response lifecycle. Among those tasks you'll commonly
196find image resizing, spam filtering, HTTP downloads, building tarballs, warming
197caches and basically everything else you can imagine that's not super fast.
198
199And it comes with a great example application you can use for inspiration. The
200L<link checker|https://github.com/kraih/minion/tree/master/examples/linkcheck>
201will show you how to integrate background jobs into well-structured
202L<Mojolicious> applications.
203
204=back
205
206=head1 REFERENCE
207
208This is the class hierarchy of the L<Mojolicious> distribution.
209
210=over 2
211
212=item * L<Mojo>
213
214=item * L<Mojo::Base>
215
216=over 2
217
218=item * L<Mojolicious>
219
220=over 2
221
222=item * L<Mojo::HelloWorld>
223
224=item * L<Mojolicious::Lite>
225
226=back
227
228=item * L<Mojo::Cache>
229
230=item * L<Mojo::Cookie>
231
232=over 2
233
234=item * L<Mojo::Cookie::Request>
235
236=item * L<Mojo::Cookie::Response>
237
238=back
239
240=item * L<Mojo::DOM::CSS>
241
242=item * L<Mojo::DOM::HTML>
243
244=item * L<Mojo::Date>
245
246=item * L<Mojo::EventEmitter>
247
248=over 2
249
250=item * L<Mojo::Asset>
251
252=over 2
253
254=item * L<Mojo::Asset::File>
255
256=item * L<Mojo::Asset::Memory>
257
258=back
259
260=item * L<Mojo::Content>
261
262=over 2
263
264=item * L<Mojo::Content::MultiPart>
265
266=item * L<Mojo::Content::Single>
267
268=back
269
270=item * L<Mojo::IOLoop>
271
272=item * L<Mojo::IOLoop::Client>
273
274=item * L<Mojo::IOLoop::Server>
275
276=item * L<Mojo::IOLoop::Stream>
277
278=over 2
279
280=item * L<Mojo::IOLoop::Stream::HTTPClient>
281
282=item * L<Mojo::IOLoop::Stream::HTTPServer>
283
284=item * L<Mojo::IOLoop::Stream::WebSocketClient>
285
286=item * L<Mojo::IOLoop::Stream::WebSocketServer>
287
288=back
289
290=item * L<Mojo::IOLoop::TLS>
291
292=item * L<Mojo::Log>
293
294=item * L<Mojo::Message>
295
296=over 2
297
298=item * L<Mojo::Message::Request>
299
300=item * L<Mojo::Message::Response>
301
302=back
303
304=item * L<Mojo::Reactor>
305
306=over 2
307
308=item * L<Mojo::Reactor::Poll>
309
310=over 2
311
312=item * L<Mojo::Reactor::EV>
313
314=back
315
316=back
317
318=item * L<Mojo::Server>
319
320=over 2
321
322=item * L<Mojo::Server::CGI>
323
324=item * L<Mojo::Server::Daemon>
325
326=over 2
327
328=item * L<Mojo::Server::Prefork>
329
330=back
331
332=item * L<Mojo::Server::PSGI>
333
334=back
335
336=item * L<Mojo::Transaction>
337
338=over 2
339
340=item * L<Mojo::Transaction::HTTP>
341
342=item * L<Mojo::Transaction::WebSocket>
343
344=back
345
346=item * L<Mojo::UserAgent>
347
348=item * L<Mojolicious::Plugins>
349
350=back
351
352=item * L<Mojo::Exception>
353
354=item * L<Mojo::Headers>
355
356=item * L<Mojo::IOLoop::Subprocess>
357
358=item * L<Mojo::JSON::Pointer>
359
360=item * L<Mojo::Parameters>
361
362=item * L<Mojo::Path>
363
364=item * L<Mojo::Promise>
365
366=over 2
367
368=item * L<Mojo::IOLoop::Delay>
369
370=back
371
372=item * L<Mojo::Server::Hypnotoad>
373
374=item * L<Mojo::Server::Morbo>
375
376=item * L<Mojo::Server::Morbo::Backend>
377
378=over 2
379
380=item * L<Mojo::Server::Morbo::Backend::Poll>
381
382=back
383
384=item * L<Mojo::Template>
385
386=item * L<Mojo::URL>
387
388=item * L<Mojo::Upload>
389
390=item * L<Mojo::UserAgent::CookieJar>
391
392=item * L<Mojo::UserAgent::Proxy>
393
394=item * L<Mojo::UserAgent::Server>
395
396=item * L<Mojo::UserAgent::Transactor>
397
398=item * L<Mojolicious::Command>
399
400=over 2
401
402=item * L<Mojolicious::Command::cgi>
403
404=item * L<Mojolicious::Command::cpanify>
405
406=item * L<Mojolicious::Command::daemon>
407
408=item * L<Mojolicious::Command::eval>
409
410=item * L<Mojolicious::Command::generate::app>
411
412=item * L<Mojolicious::Command::generate::lite_app>
413
414=item * L<Mojolicious::Command::generate::makefile>
415
416=item * L<Mojolicious::Command::generate::plugin>
417
418=item * L<Mojolicious::Command::get>
419
420=item * L<Mojolicious::Command::inflate>
421
422=item * L<Mojolicious::Command::prefork>
423
424=item * L<Mojolicious::Command::psgi>
425
426=item * L<Mojolicious::Command::routes>
427
428=item * L<Mojolicious::Command::test>
429
430=item * L<Mojolicious::Command::version>
431
432=item * L<Mojolicious::Commands>
433
434=over 2
435
436=item * L<Mojolicious::Command::generate>
437
438=back
439
440=back
441
442=item * L<Mojolicious::Controller>
443
444=item * L<Mojolicious::Plugin>
445
446=over 2
447
448=item * L<Mojolicious::Plugin::Config>
449
450=over 2
451
452=item * L<Mojolicious::Plugin::JSONConfig>
453
454=back
455
456=item * L<Mojolicious::Plugin::DefaultHelpers>
457
458=item * L<Mojolicious::Plugin::EPLRenderer>
459
460=over 2
461
462=item * L<Mojolicious::Plugin::EPRenderer>
463
464=back
465
466=item * L<Mojolicious::Plugin::HeaderCondition>
467
468=item * L<Mojolicious::Plugin::Mount>
469
470=item * L<Mojolicious::Plugin::PODRenderer>
471
472=item * L<Mojolicious::Plugin::TagHelpers>
473
474=back
475
476=item * L<Mojolicious::Renderer>
477
478=item * L<Mojolicious::Routes::Match>
479
480=item * L<Mojolicious::Routes::Pattern>
481
482=item * L<Mojolicious::Routes::Route>
483
484=over 2
485
486=item * L<Mojolicious::Routes>
487
488=back
489
490=item * L<Mojolicious::Sessions>
491
492=item * L<Mojolicious::Static>
493
494=item * L<Mojolicious::Types>
495
496=item * L<Mojolicious::Validator>
497
498=item * L<Mojolicious::Validator::Validation>
499
500=item * L<Test::Mojo>
501
502=back
503
504=item * L<Mojo::ByteStream>
505
506=item * L<Mojo::Collection>
507
508=item * L<Mojo::DOM>
509
510=item * L<Mojo::File>
511
512=over 2
513
514=item * L<Mojo::Home>
515
516=back
517
518=item * L<Mojo::JSON>
519
520=item * L<Mojo::Loader>
521
522=item * L<Mojo::Util>
523
524=item * L<Mojo::WebSocket>
525
526=item * L<ojo>
527
528=back
529
530=head1 MORE
531
532A lot more documentation and examples by many different authors can be found in
533the L<Mojolicious wiki|http://github.com/kraih/mojo/wiki>.
534
535=head1 SUPPORT
536
537If you have any questions the documentation might not yet answer, don't
538hesitate to ask on the
539L<mailing list|http://groups.google.com/group/mojolicious> or the official IRC
540channel C<#mojo> on C<irc.perl.org>
541(L<chat now!|https://chat.mibbit.com/?channel=%23mojo&server=irc.perl.org>).
542
543=cut
Note: See TracBrowser for help on using the repository browser.