6 Einträge mit diesem Tag
A common Project of every PHP-Developer is to write his own Templating System.
Templating in pseudo languages with weird syntaxes used to be very trendy and served the matter to draw a line between presentation logic and business logic.
It was also believed Templating-Languages would be a suitable replacement for plain-php, so Designers did not need to learn php. This turned out to be a huge error in reasoning, because usually Designers can code at all. (And if they claim they "can", they usually suck at it.)
Another common problem with Template-Systems is performance: Other files are parsed by php in the runtime using slow regex or maybe even reparsed with output buffering. Being a performance enthusiast it always bothered me that something is parsed and compiled by a language such as php, which is parsed itself, just for the sake of code-clearness. Usually they are not cached, and the set of functions is very limited (output this, loop that). If they're cached (e.g. Smarty) there are other Problems (just take a look at the "Cache-File"). Futhermore you as a developer need to learn a simpler templating language, which usually sucks. Debugging Template can be a pain, depending on which template System you use.
continue reading „Templating Systems - a new hope“
Hundreds of thousands -- and possibly millions -- of websites have been hit with a cyberattack that some are calling "one of the biggest mass-injection attacks we've ever seen."
A huge SQL-Injection Attack is happening right now.
continue reading „LizaMoon - a Mass-Injection Cyberattack“I needed a Server-Based mobile switch for my symfony-project. The solutions I found all used a workaround with setting the sf_format parameter to a specific mobile version. But what if you are using sf_format already for different view-types?
My Solution will use the Extension, so you can have multiple view-templates like:
I hope this is useful for somebdody! You might want to specify more parameters or make this a filter.
Working with HTML5 Audio Components, i realized Internet Explorer 9, Google Chrome and Mobile Safari, do not send Domain Cookies when requesting a playable File, which required the necessity to import the sessionid before initalize session management.
I created my own SessionStorage class and adjusted the corresponding routes to have an session_id parameter.
Whereas sessionid is the routing parameter.
Since the Doctrine 2.0 Documentation for this seems to be kinda fucked up at the moment, here is a working exampe of a
One-To-Many, Unidirectional with Join-Table Association Mapping
Use Many-To-Many to encode it properly.
Im using Annotations with the ORM-Namespace since its embedded in Symfony2. Note that One-To-Many is coded throughout Many-To-Many but the unique Index is set for the join table.
In my POV thats kinda confusing since there is a @One-To-Many relationship, but whatever!
getting started with grunt.js 9 days ago
@BASE falsch beraten, man hat mir im Okt.12 statt meines 35-Euro Tarifs "Mein Base", einen zusätzlichen Base Free 25eur Tarif augeschwätzt.. 17 days ago