Giter Club home page Giter Club logo

typo3cms-book-extbasefluid's Introduction

typo3cms-book-extbasefluid's People

Contributors

126016 avatar alexander-nitsche avatar alexanderschnitzler avatar benabbottnz avatar brotkrueml avatar cundd avatar danielsiepmann avatar fabtho avatar faerietree avatar franzholz avatar fsuter avatar hasenbalg avatar instruccionesaldorso avatar janmaennig avatar linawolf avatar lolli42 avatar marble avatar mbrodala avatar mcmietz avatar mseremet avatar neil-h avatar ohader avatar simonduerr avatar simonschaufi avatar susannemoog avatar sypets avatar tmotyl avatar tomwarwick avatar vertexvaar avatar xperseguers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typo3cms-book-extbasefluid's Issues

Improve language: grammar / style / vocabulary

Using wrong grammar / phrases / vocabulary:

No specific error, but could generally be improved.

Introduction to TYPO3, Extbase and Fluid are missing

Disclaimer: This description is opinionated, I have included it to explain why I think this issue is important and what I mean.

Summary: There are some things in this book that are already abundantly documented elsewhere (e.g OOP), but basic introductory information about TYPO3, Extbase and Fluid are missing.

What is missing

  • What is Extbase?
  • What is Fluid?
  • What is TYPO3, technical overview

You might argue, that someone reads this book already knows TYPO3. But why is it assumed, they need an introduction to OOP? I would argue the other way around: I assume someone is knowledable in programming and needs an introduction to TYPO3.

What is there but not really important (or already documented elsewhere) if you want to program extensions:

  • History of Extbase / Fluid is not particularly helpful for people learning TYPO3 today. (The information is interesting but not a prerequisite if you want to program extension.):
  • Introduction to OOP, DDD, TDD etc. are unecessary here, abundant Books and resources already exist for this. I would point out the prerequisites in the introducation (e.g. PHP, OOP, MVC etc.) and provide links.

Plan for systematic review (current master)

Once a chapter has been reviewed and corrected, it can be checked off.

Here, we focus on following goals:

  1. is text correct and up to date
  2. shorten text, remove historical references to Fluid, Neos, Pibase etc, if they are not relevant and helpful for learning extension development and only result in bloating up the text. The text is currently quite long and partly not well readable.
  3. correct language (grammar, spelling, style), correct some phrases (that probably suffered during translation) and are really difficult to understand (e.g. Programming Secure extensions)

check off relevant section once ok

correct, up to date

for master (10-dev) - July 21, 2019

shorten text (remove redundancies)

for master (10-dev) - July 21, 2019

  • about
  • introduction
  • basic design principles
  • journey blog example
  • installation
  • creating a first extension
  • modeling the domain
  • persistence layer
  • controlling the flow with controllers
  • styling the output with fluid
  • configuration (was just added)
  • internationalization
    • localization
    • validating domain objects
    • Programming secure extensions (in progress ... #296)
    • Conclusion
  • backend modules
  • command controllers
  • property mapper
  • error action (was just added)
  • coding guidelines
  • extbase reference

fix language (spelling, grammar, style), make more readable

for master (10-dev) - July 21, 2019

  • about
  • introduction
  • basic design principles
  • journey blog example
  • installation
  • creating a first extension
  • modeling the domain
  • persistence layer
  • controlling the flow with controllers
  • styling the output with fluid
  • configuration (was just added)
  • internationalization
    • localization
    • validating domain objects
    • Programming secure extensions (#296)
    • Conclusion
  • backend modules
  • command controllers
  • property mapper
  • error action (was just added)
  • coding guidelines
  • extbase reference

Streamline custom validator examples

Raised by @maikusch, the sections within Documentation/9-CrosscuttingConcerns/2-validating-domain-objects.rst are misleading. Code examples were adjusted via d9509fc#diff-eaedc983c891f372262095aee2860fc6 but do no longer match. validate() is now implemented instead of isValid(), but this does not match to extending the AbstractValidator class.

Which way is preferred and why. This way should be used through the whole section, with a small side note why it is preferred over the other.

Make text more concise / shorten

Some of the text can be shortened to about half of the length without loosing much of the information.

While we do think having a few introductory sentences is good and this text does a good job of taking the user by the hand and leading him through the material, a few suggestions:

  • remove historical references to TYPO3 4, pibase programming, flow, history of Neos etc. that are no longer of much value today. The reader wants to learn extension development.
  • remove redundancies: Some pages contain redundancies where one thing is mentioned several times in different words. Make text as short as possible without loosing information or writing style (friendly!)

Developing a custom ViewHelper: error in examples

I guess there is an error in some of the examples on Developing a Custom ViewHelper:

As mentioned in the text below the example for The implementation it should be

use \TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;

instead of

use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;

This appears in several examples on the page but will lead to a deprecated note marked as strong.

Make a decision how to proceed with this manual

  • Basic text needs to be updated / changed, examples fixed etc.
  • Some of the text is badly littered with "denglish" (Text that has been translated from German to Chinese and then to English).

For this document, we probably need some sort of plan to coordinate the efforts and put them in the right order, and this for each version e.g.

  1. Review structure, possibly completely remove some parts and decide what needs to be added
  2. Review and fix text : is it technically correct
  3. Review and fix text: are code examples correct
  4. Review and fix text: is it understandable
  5. and last (!!!) : fix style, grammar etc.

Is this task realistic, who can help, how should we proceed?

CSS Class.docutils does not render like tables

I realized that the style for defenitionlists with the class .docutils do not render like "tables" (div class t3-row) for "propertys", "Data type" and "examples".
So please add this CSS to the "theme.css"

dl.docutils{
background-color: #f2ebe3;
border: 1px none #888;
border-top: 2px solid #988d81;
clear: both;
margin-bottom: 30px;
margin-top: 30px;
position:relative;
}
dl.docutils dt{
padding: 12px 8px;
color: #b34700;
font-size: 9px;
font-weight: 400;
}
dl.docutils dd{
padding: 12px 8px;
margin:0;
}

dl.docutils dt:nth-of-type(1){
font-weight: 700;
margin-right: 8px;
min-width: 30%;
margin: 0;
position:absolute;
}

dl.docutils dd:nth-of-type(1){
font-weight:700;
position:absolute;
margin-top:20px;
}

dl.docutils dt:nth-of-type(2){
border-left: 4px solid #fff;
position:relative;
left:30%;
top:0;
}
dl.docutils dd:nth-of-type(2){
border-left: 4px solid #fff;
position:relative;
left:30%;
top:0;
max-width:70%;
}
dl.docutils dt:nth-of-type(3){
border-top: 4px solid #fff;
}

Notice about request hashes could use a little more context

https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/9-CrosscuttingConcerns/3-programming-secure-extensions.html

Be aware that request hashes (HMAC) doesn't protect against Identity field manipulation.
An attacker can modify the identify field value and then can update value of
another record, even if he doesn't usually have access to it. You have to
implement your own validation for the Identity field value (verify ownership
of the record, add another hidden field which validates the identity field
value, etc..).

This section comes out of nowhere with no explanation of request hashes, identity and how this is relevant in this context.

Also, it says what doesn't work but does not provide example for good practice.

Add examples, links ...

Make version of guide consistent (latest != 1.0.0)

The current Extbase Fluid Book currently contains 2 different versions: one for the TYPO3 version which is e.g. "latest" and another version for the book (1.0.0.) which appears in the Meta information on the start page. I find the second version (1.0.0) confusing and unnecessary. I think there should be only one version.

It is customary in the other guides to only use the version that corresponds with the branch and TYPO3 version.

Appendix C is missing

Hi!

I am having a hard time finding all the options of calculation expressions and boolean expressions possible in fluid.

In the text at https://docs.typo3.org/m/typo3/book-extbasefluid/master/en-us/8-Fluid/7-using-boolean-conditions.html a text box is saying:

You find a complete list of all evaluating possibilities in appendix C in the section “Boolean expressions”.

I was unable to find an appendix C, unfortunately. Neither did I find any more or less up to date documentation about calculation and evaluation (e.g. a fluid variant of the in_array php function might exist as in operator, but no list seems to exist).

My use case would be something like {iterator.index} % 4 in [1, 2] to make a two-column chess-board layout. However, this bug report is not about the specific use case, but about the referenced but missing documentation. (I'll probably be better off with the fluid core CycleViewHelper for this implementation.)

Part about Routing is missing

For some people it's irritating that we don't provide information about how routes work in Extbase.

We should at least add a small paragraph or chapter about routing.
What's necessary, how does it work and how can someone adjust it.

We should provide the following:

  • How to call a specific controller / action
  • How to provide arguments

Hint at https://docs.typo3.org/typo3cms/ExtbaseFluidBook/10-Outlook/4-Property-mapping.html how mapping is done for actions.
Perhaps we should also mention that there are existing extensions to configure URLs.

Also we should explain how Extbase routing differs from normal frameworks, as Extbase is a Framework within TYPO3 CMS.
Perhaps we can mention page types and also https://docs.typo3.org/typo3cms/ExtbaseFluidBook/b-ExtbaseReference/Index.html#features would be a nice hint at features.skipDefaultArguments

Provide updated example extension and reduce number of example extensions to one which is actively maintained.

This book refers to several extensions, all of which are not available for TYPO3 9 and above:

I would propose to stick to one sample extension if possible and keep this one updated! However, I have not checked sufficiently if this is possible with the current text. A journey through the blog example is based heavily on the blog example. Having up to date code that works would be very helpful.

Necessary steps:

  • Decide on best approach: update existing extensions, create new one(s)?
  • Provide updated sample extension(s)
  • Find appropriate place to put example extensions where they can be easily maintained. Currently there is https://github.com/TYPO3-extensions/examples which is a mirror of git.typo3.org

Mention requirement to put the autoload config into the central composer.json for new extensions

After working through the example Creating a first extension with a composer installed TYPO3 V9.4 I get an error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1278450972:
  Class MyVendor\StoreInventory\Controller\StoreInventoryController does not exist.
  Reflection failed.

The reason seems to be that the autoload configuration has to be put into the root composer.json. I posted the details in an answer to a similar question on SO. Maybe this can be put into the appropriate place into the documentation.

Split Fluid out of the book

Fluid is a standalone template engine. So there should be a nice documentation about the Template engine.
Also TYPO3 provide a system extension to enhance and integrate the template engine into TYPO3.

My proposal would be to split Extbase and Fluid into two separate documentations for now. Where we can decide later to split the Fluid documentation further, if helpful.

Example is broken: following the instructions results in Error 500

I followed the instructions 1 by 1 and copy/paste the examples to the files they should be in. The part with database is working fine - but the plugin cannot be finished, for all I got is an error 500 without a proper error log in the database. I checked all twice for error in structure, but it is exactly like the described one.

Blog example is obsolete

Hi, I'm trying to onboard in TYPO3 as fast as possible, so I've started with: Blog example extension. But immediately after installation, I'm getting: Class 'Tx_Extbase_Utility_Extension' not found exception.

Now I found, that Blog example is an Outdated extension with the last update at 2011!

Could you please update documentation, or send me a link for different example to smooth onboarding?

Readme instructions outdated

Error: Config directory doesn't contain a conf.py file.

When running make html, (as instructed by the readme) shpinx-build will emit the above error and refuse to build the documentation.

It seems that the project is meant to be viewed through the Typo3 sphinx-extension, which may obviate the need for a conf.py (I have no experience with neither sphinx nor the Typo3 extension.)

Additionally, after I generated a basic conf.py, the contents.rst file is missing when building from command line. I'm assuming Index.rst is supposed to fulfill that role.

I can provide a PR that will add a contens.rst & conf.py, however, I haven't gotten the sidebar to properly render (i.e. show the full navigation) in local builds. Alternatively, the Readme could be update to indicate that the documentation is meant to be viewed or compiled using the TER extension.

Chapter on individual database queries mixes Extbase and core persistence

On page https://docs.typo3.org/typo3cms/ExtbaseFluidBook/6-Persistence/3-implement-individual-database-queries.html#individual-database-queries

In the warning in, the code example uses the core QueryBuilder and not Extbase Query.

Warning
You should always avoid making queries to the persistence layer outside of the domain model. Encapsulate these queries always in a repository.
Inside of the repositories, you can access the database using a database connection:
EXT:my_extension/Classes/Domain/Repository/MyRepository.php
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
$connection = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable('tx_sjroffers_domain_model_offer');

But right after the warning, it warns about the "Extbase" execute() method (where in the previous code snippet, it is not Extbase):

Since Extbase 1.2 (TYPO3 4.4), the method execute() returns a multidimensional array

This is at least slightly confusing, and it might be a good idea to add that we are using core persistence and why.

Also, I am not sure why we have this warning. Additionally, it seems out of place in the section on "Orderings in the query".

Structure: Plan for this manual?

This manual has several problems:

  • Several things are general, such as "Developing Custom ViewHelpers" and not specific to the goal described here (Developing Extensions - primarily plugins - with Extbase / Fluid)
  • Too lengthy for online reading and maintainance, some things are described several times, several example extensions which are not being updated

Proposal

This is also inspired by #198 and what others have suggested.

  • Create a tutorial: "Developing plugins with Extbase & Fluid" covering only that. This could be a separate manual or could exist in "Content & plugins" section in "TYPO3 Explained"
  • Create an "Extension Development Getting Started", either within TYPO3 EXplained or as separate manual
  • As is currently being done for Fluid, create a startpage for "Extbase" in TYPO3 Explained which gives an introduction and gives overview to existing documentation
  • Move some general things to "TYPO3 Explained", e.g. "Creating Custom ViewHelpers" to "Fluid" page that is currently being developed.
  • Take down the book and link to appropriate start page, e.g. "Extbase" in "TYPO3 Explained as described above.
  • Section "Extbase" in "TYPO3 Explained" could contain a start page, introduction and a reference
  • For 9.5 we could refer to the book by Michael Schams

Some things have already been moved from the book

Related:

Document annotations

Configuring the Plugin - Typo3 Documentation

Help needed:

I copied and installed the extension from the documentation after writing the extension step by step failed: https://github.com/TYPO3-Documentation-Examples/store_inventory
See also: https://docs.typo3.org/m/typo3/book-extbasefluid/9.5/en-us/4-FirstExtension/7-configuring-the-plugin.html

As per Documentation I should see an additional extension 'The Store Inventory List'. Which is not shown. I activated the "Store Inventory" Extension already.

Also as illustrated below, the "plugin" tab is missing on my backend (The screenshot is from the documentation).

After installation of the extension we can insert the plugin on a page. Don’t forget to set the sys folder, in which the products are stored, as the starting point (in our case “Inventory”) in the plugin. Otherwise your products are not found (see figure 4-4).

image

What am I missing here?

The following things I have tried:

  • flush all cache.
  • Deactivate and Reactivate
  • Tried same steps in Typo3 v8.7

System Info:
Typo3 v9.5 & Typo3 v8.7
PHP 7.2 with MariaDB
Local Dev Environment
Extensions managed by Composer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.