[TYPO3-core] RealURL 2.x announcement
Dmitry Dulepov
dmitry.dulepov at gmail.com
Fri May 8 15:27:25 CEST 2015
Hello!
I would like to introduce RealURL v2 code.
Firsts, I would like to stress that some features are still missing
(more on that later) and the code did not go through extensive testing.
It is *not* ready for using on production. However it can do nearly
everything that RealURL 1.x did. It also has many improvements over 1.x
code, which makes it a great successor of RealURL 1.x.
Principles
=========================
When developing the new code I followed certain ideas and principles.
They would explain many design&architecture decisions to you. Here they are:
* Compatibility with 1.x. You should be able to use 2.x as a drop in
replacement for 1.x.
* It should be fast.
* The code should be clean, readable and modifiable by others.
* Caching should be efficient for the job but provide a possibility to
change cache implementation as needed by agencies.
* TYPO3 6.2+
How this was implements?
=========================
First of all, nearly all code is new. I only borrowed some alias
handling code but reworked it. There are certain plans to enhance it [1]
but this is low priority for now.
2.x is compatible with 1.x by configuration. Some configuration options
are gone but RealURL will not complain if they still appear in the
configuration. You have to update the database because some tables are
gone and new tables appeared.
Earlier RealURL used many different types of caches: encode cache,
decode cache, alias cache, path cache, cHash cache. Now alias cache is
hard-wired (reasons later). cHash cache and separate encode/decode
caches are gone. Instead there is a single url cache that is filled more
efficiently and used for both encoding and decoding. In version 1.x if
the URL was encoded and put to the encode cache, decoding process still
had to do its reconstruction work and could fail in certain cases). Now
there is a single cache, do decoding will be faster. Also there is a way
to prevent cache from pollution from solr and indexed_search that can
create thousands of cache entries in RealURL 1.x if you use Google
Analytics friendly search URLs. Path cache is nearly the same as before.
Since there is a single cache for encoding and decoding, it presents a
certain challenge. When decoding, they key to the cache is a speaking
URL. When encoding, they key to the cache is original URL. It is not
possible to have two separate keys with the TYPO3 caching framework. It
is possible to make it using tags and complex logic. However I took
another decision to implement the cache. There is a cache interface that
anybody can use to provide his favorite cache implementation. As soon as
the implementation conforms to the interface, RealURL can use it. There
is a default implementation that uses database. It is optimized and
suites small to medium sized hosts. For lager hosts I plan another
implementation. It will be either based on caching framework or it will
be a direct Redis implementation. Note: since the code is not fixed yet,
caching interface still may change. You need to watch the repo if you
want to jump into cache implementation.
Alias cache is even more complicated and now it is hard-wired into the
database. May be, I (or somebody else) can find the way to unwire it and
use with a generic caching interface. But this is complicated because
there are about 5 parameters that can change and RealURL should be able
to find the same entry by a combination of some of those parameters.
Also aliases is the most tricky part. Encoding is simple but decoding is
extremely complicated without cache (usually just impossible).
Missing features
=========================
* No support for excluding pages from path yet (but planned to work on
this next!)
* No BE management modules (needed badly, Extbase programmers, jump in!)
* No support for mount points (does anybody use those still?)
Where is it?
=========================
https://github.com/dmitryd/typo3-realurl/
Repo, docs and issues are all there. Default branch is "development"
because I use GitFlow as a branching model. Feel free to look but be
careful with modifications.
Plans
=========================
There were talks about including RealURL to the core. I do not know if
this will happen in future but I would be happy if more people can
participate in the development. Since I am quite busy with daily work,
it makes sense that core team takes over such a critical extension as
RealURL and integrates it into the TYPO3 core.
I plan to implement a couple of missing features and than, if the core
team decides, we can have RealURL in the core. You can see my current
list of tasks in the issue tracker on GitHub.
How you can help?
=========================
Testing. And testing. And testing.
This is what needed most right now.
Expect bugs!!! While this is new code and it is much cleaner than 1.x
code, RealURL is still an "ugly hack" on top of TYPO3. TYPO3 was *not*
designed to use speaking URLs, so RealURL 1.x or 2.x, CoolURI or
whatever else such extension will always be an ugly hack. And as any
ugly hack, it can fail unexpectedly. With your testing help we can
reduce failures to nearly zero.
Questions, suggestions, etc
=========================
Before you start putting things to the bug tracker, let's discuss them
here. I will visit this thread from time to time and answer questions.
There is one thing I want to kindly ask from you. We all have our
opinions about how to do things the best way. Your way may disagree with
mine. Believe me, I thought a lot about the implementation. However I am
not saying I am the best. I fully accept that there are people, who can
design and implement things better than I. I am ready to discuss the
implementation. If your idea is better, I would be happy to accept it.
Therefore I ask to post no complaints without alternative solutions and
arguments for them. Thank you for understanding! :)
!!! I have public holidays on May 9-10-11. I will try to look into this
thread but I cannot promise I will be here. If you do not see answers
from me on this day, just be patient :)
"Thanks", etc
=========================
From my heart I want say big thanks to my employer (snowflake
productions gmbh) and personally to Patrick Aubert de la Rüe and Martin
Wiederkehr, who decided to donate more than 40 hours of work on RealURL
2.x. This is about half of the time spent on development to this moment.
Links
=========================
[1] https://github.com/dmitryd/typo3-realurl/issues/5
--
Dmitry Dulepov
Today is a good day to have a good day.
More information about the TYPO3-team-core
mailing list