15 Jul 2019

feedSymfony Blog

SymfonyCloud: from Early Access to General Availability

After two years of development and years of R&D with our partners: the technology behind SymfonyCloud is now production ready. We are thus super happy to announce the general availability of SymfonyCloud!

Ryan Weaver, Symfony Core Team member and SymfonyCasts founder:

Thanks to SymfonyCloud, we deleted thousands of lines of infrastructure config. What did we get in return? More reliable deployments, faster response times, automatic security upgrades, true staging environments & endless debugging tools. It's made for Symfony apps, which means it handles a lot of details for us. But we also extended it hard: microservices that talk to each other, Elasticsearch, Redis, multiple databases & even some crazy things with workers & custom video processing tools. SymfonyCloud makes doing all of this (with a small team and no sys-admins) possible.

Damien Alexandre, French consultant at JoliCode, PHP and Elasticsearch expert:

Currently playing with @symfony Cloud for a new project

  • basic setup deployed in a couple of hours;
  • great configuration format;
  • no ops, no admin-sys;
  • even managed to run the @redirectionio agent, thanks to @tucksaun

So far, so good

SymfonyCloud, our PaaS optimized for Symfony applications, has been unveiled last December. Since then, we have opened registration for Early Access to the platform on a daily basis. We gathered a lot of feedback during the last six months of Early Access. It allowed us to improve the product a lot: UI, DX, documentation, support, and billing.

This might not be easy for everyone not involved in SymfonyCloud development to follow everything that happened during the last months so today I would like to share with you some of our achievements.

SymfonyCloud is a fully-managed platform created by friendly Symfony developers for busy Symfony developers. It is the best way to host your Symfony applications. It tightly integrates with Symfony's best practices and development workflow to give you the tools to develop locally with comfort and deploy with confidence. This is especially true for the latest versions of Symfony 4 with the Built-In Environment Variable Processors, workers implementation (to manage the queues in the Messenger component) or RabbitMQ Management UI enabled by default just like any other supported services (MySQL/MariaDB, PostgreSQL, Redis, Memcached, Elasticsearch, RabbitMQ, MongoDB, Influx DB, Solr, Varnish, and Kafka...).

SymfonyCloud allows you to completely define and configure the topology and services you want to use on your projects. Unlike other PaaS services, SymfonyCloud is batteries included which means that you don't need to subscribe to external services to get a cache or a search engine. And that those services are managed. When you back up your project, all of the services are backed-up. It also guarantees full compatibility with the Symfony CLI local web server to test locally your services from production.

A perfect use-case of SymfonyCloud is symfony.com!

The symfony.com website is hosted on SymfonyCloud since the opening of the Early Access registration. It totally changed the way we hosted the website before and allowed us to:

SymfonyCloud brings you simplicity and confidence in your infrastructure management:

Titouan Galopin, Symfony developer:

At En Marche (a French political party), we were used to rely on Kubernetes on Google Cloud to orchestrate and manage our Symfony applications. We invested a lot of time and resources into building a scalable and reliable environment with it.

However, as the party grew, we had less and less time to dedicate to infrastructure. When we launched the European elections campaign in December 2018, we decided to switch to SymfonyCloud. The result was outstanding: we got the same level of scalability and reliability, with additional flexibility, zero-downtime deployment, dropping thousands of lines of YAML and for a cheaper price. Everything became much simpler in an instant.

But in my opinion, what's even more interesting is how SymfonyCloud helped us organize our IT department around the needs of the different other departments. By being able to host different Git branches in parallel on different URLs, we were able to work on the same project for both the legal department, the political department and the accounting, iterating on three different features in parallel with different interlocutors. This alone saved us dozens of meetings and hundreds of hours of many people across the entire organization.

Deploy today, get started now with SymfonyCloud!


Be trained by Symfony experts - 2019-07-17 Clichy - 2019-07-22 Clichy - 2019-07-22 Clichy

15 Jul 2019 12:13pm GMT

feedDjango community aggregator: Community blog posts

Django's Test Case Classes and a Three Times Speed-Up

Rearing Pony

This is a story about how I sped up a client's Django test suite to be three times faster, through swapping the test case class in use.

Speeding up test runs is rarely a bad thing. Even small teams can repeat their test run hundreds of times per week, so time saved there is time won back. This keeps developers fast, productive, and happy.

Django's Test Case Classes

A quick refresher on how the Django's three basic test case classes affect the database:

The distinction between TransactionTestCase and TestCase can be confusing. Here's my attempt to summarize it in one sentence:

TransactionTestCase that allows your code to use transactions, whilst TestCase uses transactions itself.

The Speed-Up Story

Recently I was helping my client ev.energy improve their Django project. A full test run took about six minutes on my laptop when using the test command's --parallel option. This isn't particularly long - I've worked on projects where it took up to 30 minutes! But it did give me a little time during runs to look for easy speed-ups.

Their project uses a custom test case class for all their tests, to add extra helper methods. It originally extended TransactionTestCase, with its slower but more complete database reset procedure. I wondered why this had been done.

I searched the Git history for the first use of TransactionTestCase with git log -S TransactionTestCase (a very useful Git option!). I found a developer had first used it in tests for their custom background task class called Task.

Task closed the database connection at the end of its process with connection.close(). This helped isolate the tasks. Since they're run in a long running background process, using a fresh database connection for each task helped prevent a failure in one from affecting the others.

Unfortunately the call to connection.close() prevented use of TestCase when testing Task classes. Closing the database connection also ends any transactions. So when TestCase ran its teardown process, it errored when trying to roll back the transactions it started in its setup process.

Because of this, the developers used TransactionTestCase for their custom test case class. And they stuck with it as the project grew.

This was all fair, and the speed difference would not have been noticeable when there were fewer tests. Fixing it then allowed them to focus on feature development.

But as with test time things like this, the seconds added up over time. Much like the metaphorical frog in a slowly boiling pot of water.

Once I'd discovered this piece of history, I guessed most of the tests that didn't run Task classes would work with TestCase. I swapped the base of the custom test class to TestCase, reran, and only the Task tests failed!

After changing those broken test classes to remain on TransactionTestCase, I reran the suite and everything passed. The run time went down from 375 seconds to 120 seconds. A three times speed-up!

Fin

I hope this post helps you find the right test case class in your Django project. If you want help with this, email me - I'm happy to answer any questions, and am available for contracts. See my front page for details.

Thanks for reading,

-Adam

15 Jul 2019 4:00am GMT

14 Jul 2019

feedSymfony Blog

A Week of Symfony #654 (8-14 July 2019)

This week, the upcoming Symfony 4.4 version worked on improving the progress bar redraws of the Console component, deprecated WebserverBundle in favor of the Symfony local web server and introduced a feature to make the bundle public dir configurable. Meanwhile, the upcoming Symfony 5.0 version added compatibility with Monolog 2.

Symfony development highlights

This week, 102 pull requests were merged (74 in code and 28 in docs) and 81 issues were closed (58 in code and 23 in docs). Excluding merges, 43 authors made 5,867 additions and 2,866 deletions. See details for code and docs.

3.4 changelog:

4.2 changelog:

4.3 changelog:

4.4 changelog:

Master changelog:

Newest issues and pull requests

They talked about us

Upcoming Symfony Events

Call to Action


Be trained by Symfony experts - 2019-07-17 Clichy - 2019-07-22 Clichy - 2019-07-22 Clichy

14 Jul 2019 7:36am GMT

11 Jul 2019

feedDjango community aggregator: Community blog posts

SongSearch autocomplete rate now 2+ per second

By analyzing my Nginx logs, I've concluded that SongSearch's autocomplete JSON API now gets about 2.2 requests per second. I.e. these are XHR requests to /api/search/autocomplete?q=....

Roughly, 1.8 requests per second goes back to the Django/Elasticsearch backend. That's a hit ratio of 16%. These Django/Elasticsearch requests take roughly 200ms on average. I suspect about 150-180ms of that time is spent querying Elasticsearch, the rest being Python request/response and JSON "paperwork".

Autocomplete counts in Datadog

Caching strategy

Caching is hard because the queries are so vastly different over time. Had I put a Redis cache decorator on the autocomplete Django view function I'd quickly bloat Redis memory and cause lots of evictions.

What I used to do was something like this:

def search_autocomplete(request):
   q = request.GET.get('q') 

   cache_key = None
   if len(q) < 10:
      cache_key = 'autocomplete:' + q
      results = cache.get(cache_key)
      if results is not None:
          return http.JsonResponse(results)

   results = _do_elastisearch_query(q)
   if cache_key:
       cache.set(cache_key, results, 60 * 60)

   return http.JsonResponse(results)   

However, after some simple benchmarking it was clear that using Nginx' uwsgi_cache it was much faster to let the cacheable queries terminate already at Nginx. So I changed the code to something like this:

def search_autocomplete(request):
   q = request.GET.get('q') 
   results = _do_elastisearch_query(q)
   response = http.JsonResponse(results)   

   if len(q) < 10:
       patch_cache_control(response, public=True, max_age=60 * 60)

   return response

The only annoying thing about Nginx caching is that purging is hard unless you go for that Nginx Plus (or whatever their enterprise version is called). But more annoying, to me, is that fact that I can't really see what this means for my server. When I was caching with Redis I could just use redis-cli and...

> INFO
...
# Memory
used_memory:123904288
used_memory_human:118.16M
...

Nginx Amplify

My current best tool for keeping an eye on Nginx is Nginx Amplify. It gives me some basic insights about the state of things. Here are some recent screenshots:

NGINX Requests/s

NGINX Memory Usage

NGINX CPU Usage %

Thoughts and conclusion

Caching is hard. But it's also fun because it ties directly into performance work.

In my business logic, I chose that autocomplete queries that are between 1 and 9 characters are cacheable. And I picked a TTL of 60 minutes. At this point, I'm not sure exactly why I chose that logic but I remember doing some back-of-envelope calculations about what the hit ratio would be and roughly what that would mean in bytes in RAM. I definitely remember picking 60 minutes because I was nervous about bloating Nginx's memory usage. But as of today, I'm switching that up to 24 hours and let's see what that does to my current 16% Nginx cache hit ratio. At the moment, /var/cache/nginx-cache/ is only 34MB which isn't much.

Ideal would be some user-friendly diagnostics tool that I can point somewhere, towards Nginx, that says how much my uwsgi_cache is hurting or saving me. Autocomplete is just one of many things going on on this single DigitalOcean server. There's also a big PostgreSQL server, a node-express cluster, a bunch of uwsgi workers, Redis, lots of cron job scripts, and of course a big honking Elasticsearch 6.

11 Jul 2019 10:21pm GMT

Single-file Python/Django Deployments

This post covers portions of my talk, Containerless Django, from DjangoCon US 2018.

Deploying Python has improved significantly since I started working with it over a decade ago. We have virtualenv, pip, wheels, package hash verification, and lock files. Despite all the improvements, it still feels harder than it needs to be. Installing a typical large project has many steps, each one easy to trip up on:

  1. Install Python
  2. Install build tools (pip/virtualenv, pipenv, poetry, etc.)
  3. Install build dependencies (C compiler, development libraries, etc.)
  4. Download the code
  5. Run the build tools
  6. If you're using Node to build client-side files for a website, repeat steps 1-5 for that

It's normal for ops teams to repeat this process as part of the automated testing and then again on every server the project is deployed to. It's no wonder Docker has become so popular because of the ease in which you can build-once and deploy-everywhere.

But Docker is a heavy-handed solution and doesn't fit for every project. I envy the simplicity of languages like Go where you can compile your project down to a single binary that runs without any external dependencies. Even Java's JAR file format which requires Java to be preinstalled, but otherwise only requires downloading a single file would be a huge improvement.

A JAR File for Python

Turns out there are already a few projects solving this problem. PEX from Twitter, XAR from Facebook, and more ambitious projects like PyOxidizer, but shiv from LinkedIn hits the sweet spot for us. It is simple, stable, does not require special tooling, and incurs no runtime performance hit. It creates a ZIP file of all your code and dependencies that is executable with only a Python interpreter. In a future post, we'll do a deep-dive into how shiv works under-the-hood, but for brevity's sake, we'll treat it as a black box here.

Using Shiv with Django

Shiv works with any proper Python package. Since most Django developers don't think about packaging their projects, we'll give you a crash course here.

Packaging Your Project

Previously, the only viable packaging tool was setuptools, but since PEP-517 we now have a number of other options including flit and poetry. At the moment, setuptools is still the de-facto standard, so, despite it being a little cruftier than the other options we'll use that in our example.

You can use our post, Using setup.py in Your (Django) Project, as a starting point, but we need to take a couple more steps to ensure non-Python files (static files, templates, etc.) are included.

The easiest way to do this is with a MANIFEST.in file. It might look something like this:

graft your_project/collected_static
graft your_project/templates

Note that these directories need to live inside the top-level Python module to be included. Also note that the static files directory should be your STATIC_ROOT not your STATICFILES_DIRS. If you define templates inside your individual apps, you'll need to include those directories as well.

Dealing with Dependencies

These days, every project should include some sort of a lock file which is machine generated and defines the exact version of every dependency and the hash verifications for them. You can do this via poetry, pip-compile from pip-tools, or pipenv.

I typically let one of these tools handle the install and then pass its site-packages directory to shiv via the --site-packages option. In that case, you'll also pass the pip flags --no-deps . to install your local project, but not include any defined dependencies for it.

Including an Entry Point

We need to provide shiv a Python function that it will run when the zipapp is executed. The most logical one is the equivalent, manage.py. You can use django.core.management.execute_from_command_line directly, but I recommend writing a small wrapper which also sets the default DJANGO_SETTINGS_MODULE environment variable. You could create a __main__.py in your project and include the following:

import os
from django.core.management import execute_from_command_line

def main():
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "your_project.settings")
    execute_from_command_line()

if __name__ == "__main__":
    main()

Putting it in __main__.py is a Python convention that also allows you to execute management commands via python -m your_project ....

The Shebang

While not necessary, you can customize the shebang of your zipapp to have it executed with a specific version of Python or a Python from a specific location. I typically use /usr/bin/env python3.7 (or whatever version the project expects).

Putting this altogether, you might have something like this in your CI script:

pipenv install --deploy
pipenv run manage.py collectstatic --noinput
shiv --output-file=your_project.pyz \
     --site-packages=$(pipenv --venv)/lib/python3.7/site-packages \
     --python="/usr/bin/env python3.7" \
     --entry-point=your_project.__main__.main \
     --no-deps .

Production Webserver

Astute readers may have noticed there's not an easy way to run uwsgi or gunicorn when we want to deploy. Typically you execute your webserver, then point it at your project instead of the other way around. We created django-webserver so you'll have access to your favorite WSGI server as a management command. We also sponsored work on uWSGI to package it as a wheel making it quick and easy to use in this setup. 🎺

You'll also want to be sure that your zipapp can serve its own static files, either via whitenoise or by letting uwsgi handle your staticfiles (included by default in django-webserver).

Settings

People do all sorts of strange things with Django settings. You can still use the DJANGO_SETTINGS_MODULE environment variable to pick the settings to use at runtime. You can also use environment variables to set different values in your settings file, but that can be tedious and, potentially, a security problem.

Instead, I prefer to use a file that is easily machine readable (JSON or YAML) and also easily generated from configuration management or a secret manager like chamber or Hashicorp Vault.

We built another package, goodconf which lets you use a static configuration file (or environment variables) to adjust settings across environments. This lets us treat our zipapp more like a standard application and less like a special-case Django app. The people who handle your deployments should appreciate this.

Deployment

Once you have your zipapp, deployment is almost trivial:

  1. Install Python
  2. Create the configuration file
  3. Download the zipapp (we store ours in S3)
  4. Start server - ./myproject.pyz gunicorn or ./myproject.pyz pyuwsgi

Caveats

Zipapps created with shiv aren't a perfect solution. You should be aware of a few things before you start using them.

Extraction

On first execution, shiv will cache the zip file contents into a unique directory in ~/.shiv (path is configurable at runtime). This creates a small delay on first run. It also means you may need to periodically clean out the directory if you're doing lots of deploys.

System Dependencies

If you are using libraries which depend on system libraries, they will also need to be installed on the deployment target. For example, mysqlclient will require the MySQL library. Fortunately, the proliferation of the wheel format allows authors to bundle these libraries with their packages as is the case with Pillow, psycopg2-binary, lxml, and many others.

Flexibility

Your zipapp will define a single entry point. While it is possible to override it at runtime or even drop into a Python interpreter, I would save those options for debugging only. If you are used to running arbitrary scripts from your project or loading arbitrary files from your git repository, you'll need to use some more discipline to make management commands for the things you want to run once deployed.

Portability

Pure Python projects should be very portable across different operating systems and potentially different Python versions. As soon as you start compiling dependencies however, your best bet is to build on the same OS and Python as you intend to run the project.

Isolation

Your project will run with the system's site packages in sys.path, effectively the same as creating a virtualenv with --system-site-packages. For better isolation, use the -S flag for Python, e.g. python3.7 -S ./your_project.pyz. See this GitHub Issue for more details.

We've been successfully running this site and many of our client sites using shiv-generated zipapps for a few months now. We're very happy with the simplicity and speed it lends to rolling out new software. If you're using shiv or a similar technique to bundle your application, let us know in the comments below.

11 Jul 2019 3:29am GMT

07 Jul 2019

feedSymfony Blog

A Week of Symfony #653 (1-7 July 2019)

This week, the upcoming Symfony 4.4 version improved the Length validation constraint to allow rejecting empty strings, the HttpClient component added support for NTLM authentication and the Panther component was updated to allow using the new BrowserKit assertions. Meanwhile, the SymfonyCon 2019 conference announced the first part of its schedule.

Symfony development highlights

This week, 93 pull requests were merged (70 in code and 23 in docs) and 39 issues were closed (19 in code and 20 in docs). Excluding merges, 36 authors made 1,497 additions and 567 deletions. See details for code and docs.

3.4 changelog:

4.2 changelog:

4.3 changelog:

4.4 changelog:

Master changelog:

Newest issues and pull requests

They talked about us

Upcoming Symfony Events

Call to Action


Be trained by Symfony experts - 2019-07-17 Clichy - 2019-07-22 Clichy - 2019-07-22 Clichy

07 Jul 2019 7:23am GMT

29 Jun 2017

feedZend Developer Zone

PHP 7.2: Add Extension By Name

I don't know if you've been keeping up, but there's not a lot of new coming down the pipe in PHP 7.2. Yeah, there is a good list of things that are being deprecated, and a change to allow for type widening, but compared to PHP 7.0 and PHP 7.2, PHP 7.2 is positively a yawner. This makes writing articles about the new hotness coming down the pipe a bit difficult.

The post PHP 7.2: Add Extension By Name appeared first on Zend Developer Zone.

29 Jun 2017 6:36pm GMT

27 Jun 2017

feedZend Developer Zone

Deprecations in PHP 7.2

The only constant is change.
- Heraclitus of Ephesus

PHP is a living language and as such, as some things are added, others are removed. Click on inside to find out what is being flagged to go away in PHP 7.2

The post Deprecations in PHP 7.2 appeared first on Zend Developer Zone.

27 Jun 2017 3:41pm GMT

16 Jun 2017

feedZend Developer Zone

June 2017 PHP Community (coffee) Cup of Service winner

It is time for the June 2017 PHP Community (coffee) Cup of Service award. This month it goes to someone who has been giving to PHP for more than 15 years, Ms. Sara Golemon. Sara: Is a regular speaker at PHP conferences worldwide An active core contributor One of the release managers of PHP 7.2 Please join us here at... Read more »

The post June 2017 PHP Community (coffee) Cup of Service winner appeared first on Zend Developer Zone.

16 Jun 2017 12:00pm GMT

11 Nov 2011

feedCI News

Reportula

What can you tell us about the team that built reportula.org?

The Team that made reportula.org is just one person. Pedro Oliveira, started Reportula when he needed a clean and fast web application that reported the Bacula Backups software of the company he works for. He has decided to open the project, and let it grow to full web application that is able to manage the Bacula Backups.

Reportula Website Screen Shot

What can you tell us about the site in general? What are the goals of the site and the main audience?

Reportula is a php based web program that provides you a summarized output of jobs that have already run. It obtains its information from the Bacula's database. Aside from a nice graphical display, it provides summaries of your jobs, as well as graphs of job usage. This is a fairly high level bacula management tool.

The main goals were to create a web reporting tool for the bacula backups system, as I got further into the project it developed into something more than that. Right know it calculates average of bacula backups, it has time line history of backups. Imagine this scenario for example, if you use the crontab feature of reportula, you can see in time by how much data your backups infrastructure is growing.

Example. in 2011.05.01 if backups infrastructure stores 500 Tera bytes, in 2011.12.30 it stores 510 terabytes. This is very handy for us because with this feature you can predict the storage needs of your backups for the future.

What was your major consideration in using CodeIgniter for this?

I chose codeigniter because I needed an easy, fast, and supported PHP development framework. I found that with Codeigniter I could achieve that. This project was made in less than month.

Another nice thing about Codeigniter is that you don't have to "re-invent the wheel". Codeigniter has most of the thing that you need for an application already developed. All you have to do is connect the blocks which is very easy.

What is next on the plate for reportula.org? Any additional functionality you can tell us about?

On the plate for Reportula is user registrations, acls, and managing Bacula Backups like "bconsole".

Do you have any other information you'd like to share with the community? Tips from this project you'd like to share? Lessons you've learned?

First of all i think that Codeigniter is one of the best frameworks on the internet. I've tried them all (Cake, Yii, Symfony, Zend) they are all too complicated, too big, with lots of features and slow. They all had one problem BIG, STEEP LEARNING CURVE.

Codeigniter has less features than the others but you start making an application in less than 30 minutes. And what it does it does well! Even if you think you need a big framework after starting with codeigniter it cames to you that you don't need another framework to develop some applications. The lessons I learned are don't re-invent the wheel, Codeigniter does it and does it well, the community are nice, and always had support on the forum.

11 Nov 2011 10:19pm GMT

10 Nov 2011

feedshare.ez.no > All forums (topics and replies)

Re: ezoe : Not found error in customTags popup

Hello Franck,

I'm sorry I have not yet encountered this problem before.

What version of eZ Pubish are you using?

What version of ezoe are you using?

If you have a set of reproducible instructions to recreate the issue using the latest community build available you may wish to consider filing an issue on http://issues.ez.no/ezoe

I hope this helps ...

Cheers,

Heath

10 Nov 2011 2:44am GMT

Re: Single login through different SiteAccess (using sub-domains)

Edit your site.ini like that :

[Session]
SessionNameHandler=custom
SessionNamePerSiteAccess=disabled

Set a common cookie_domain for all your sub domains! To do that you can edit your apache virtual_host and add that line into it :

php_value session.cookie_domain ".mysite.com"

Thanks Yannick, it was really useful, but I needed to isolate groups of siteaccess under the same domain, it's possible using site.ini / [Session] / SessionNamePrefix. You just have to set the same value for each siteaccess you want to share the session.

Example :

I have siteaccesses siteA, siteB, siteC, siteD and siteE. I want siteA, site B and siteC to share a session, and siteD and siteE to share another session.

In

[Session]
SessionNameHandler=custom
SessionNamePerSiteAccess=disabled
SessionNamePrefix=fooPrefix

In

[Session]
SessionNameHandler=custom
SessionNamePerSiteAccess=disabled
SessionNamePrefix=barPrefix

10 Nov 2011 2:14am GMT

Re: user ans rules

Hello Amine,

I took a few minutes and wrote a custom owsimpleoperator template operator function on your behalf.
When you use this you should be able to do so without touching the code.

This solution provides you a new custom template operator named 'member_of_role' which you would use like this ... (note this is a simple static example you will want to use dynamic values instead of course.

{def $userID=10
        $roleID=1
        $isMemberOfRole=$userID|member_of_role( $roleID )}
 
{if $isMemberOfRole}
 
Success! This userID {$userID} is a member of this roleID {$roleID} ...
 
{else}
 
Failure! This userID {$userID} is *not* a member of this roleID {$roleID} ...
 
{/if}

The custom 'member_of_role' operator accepts UserID and RoleID (Both required) and fetches the user, user roles, iterates over user roles and compares RoleID param till it finds a match and returns true, false if no match is found / etc.

This operator uses builtin / core eZ Publish PHP class methods for the very best in terms of reliability and stability.

share.ez.no is terrible to use when trying to paste pre formated (whitespace, no tabs, plain text) source code within the ezoe custom plugin input which has been written outside of ezoe and pasted in.

This off and on is a real problem with this site. It's no wonder so few folks post source code within the forums these days ... So I have posted my example solution source code in a pastebin instead, http://ezpublish.pastebin.ca/2093464

Please let me know how this solution works for you.

One final note: This code can also be called statically within custom PHP code without making any changes.

Here is an example PHP call of the function which powers the operator: ''

Please remember to clear cache and regenerate autoloads be for using this solution within eZ Publish!

I hope this helps ...

Cheers,

Heath

Edit: I found some extra time later in the evening and tested the operator in templates and it worked perfectly (as well as via PHP directly). Best wishes!

10 Nov 2011 1:34am GMT

09 Nov 2011

feedPlanet Zope.org

Updated MiniPlanet, now with meta-feed

My MiniPlanet Zope product has been working steady and stable for some years, when suddenly a user request came along. Would it be possible to get a feed of all the items in a miniplanet? With this update it became possible. MiniPlanet is an old-styl...

09 Nov 2011 9:41am GMT

07 Nov 2011

feedPlanet Zope.org

Welcome to Betabug Sirius

It has been quite some time that I announced_ that I'd be working as a freelancer. Lots of stuff had to be done in that time, but finally things are ready. I've founded my own little company and set up a small website: Welcome to Betabug Sirius!

07 Nov 2011 9:26am GMT

03 Nov 2011

feedPlanet Zope.org

Assertion helper for zope.testbrowser and unittest

zope.testbrowser is a valuable tool for integration tests. Historically, the Zope community used to write quite a lot of doctests, but we at gocept have found them to be rather clumsy and too often yielding neither good tests nor good documentation. That's why we don't use doctest much anymore, and prefer plain unittest.TestCases instead. However, doctest has one very nice feature, ellipsis matching, that is really helpful for checking HTML output, since you can only make assertions about the parts that interest you. For example, given this kind of page:

>>> print browser.contents
<html>
  <head>
    <title>Simple Page</title>
  </head>
  <body>
    <h1>Simple Page</h1>
  </body>
</html>

If all you're interested in is that the <h1> is rendered properly, you can simply say:

>>> print browser.contents
<...<h1>Simple Page</h1>...

We've now ported this functionality to unittest, as assertEllipsis, in gocept.testing. Some examples:

self.assertEllipsis('...bar...', 'foo bar qux')
# -> nothing happens

self.assertEllipsis('foo', 'bar')
# -> AssertionError: Differences (ndiff with -expected +actual):
     - foo
     + bar

self.assertNotEllipsis('foo', 'foo')
# -> AssertionError: "Value unexpectedly matches expression 'foo'."

To use it, inherit from gocept.testing.assertion.Ellipsis in addition to unittest.TestCase.


03 Nov 2011 7:19am GMT

02 Nov 2011

feedCI News

GoCart

Every week we hear of really awesome places that CodeIgniter is being used. I want to start sharing those with the community-at-large. I will start by posting them here under a new Showcase Category with the hopes that any future revisions of CI.com will have a section for stuff like this. You guys and gals make some really cool stuff and deserve a platform to show it off.

So without further ado…

This showcase is an interview with Kyle Roseborrough about GoCart

What can you tell us about the GoCart team?

We have a pair of PHP developers who knew there was a better way to build a shipping cart. Noah (lead developer) has 6 years experience in PHP development and 4 years in CodeIgniter. Gabe has about 10 years experience in web application development. Kyle has been working in UI and management for 10 years.
GoCart Website Screen Shot

What can we tell about the site in general?

GoCartdv.com was built to showcase GoCart and offer some basic information on the system.

What are the goals of the site and the main audience?

The main audience is CodeIgniter developers who are wanting a simple, scalable, CodeIgniter shopping cart. The goal is to get people involved in development to improve the cart and allow it to fully embody the goal of the project. To be easy to customize for developers and easy to use for end users/customers

What was your major consideration in using CodeIgniter for this?

CodeIgniter has great documentation and is easy to learn. We build lot of custom projects on CodeIgniter and it only made sense for us to build our cart on it. When looking for commerce solutions, we never found a suitable solution built on CodeIgniter so we decided to set out to do it on our own.

What is next on the plate for GoCart?

We really want GoCart to foster a great community of people contributing back to the roadmap and path the project will take. We want the focus to remain the same though "Easy to Customize, Easy to Use". It would be great if we could get enough people using.

Any additional functionality you can tell us about?

Well, not really. GoCart is intended to be a shopping cart, plain and simple. It does have some basic page and banner management and a whole slew of cart related features, but ultimately it's an ecommerce platform.

Do you have any other information you'd like to share with the community?

We built GoCart to be simple and scalable. As time goes on, we want the software to become easier and easier to use. We want GoCart to be scalable and to be able to work with new platforms as they come out. We feel that CodeIgniter and the CodeIgniter community is a huge benefit here. It enables developers to tie into a whole plethora of libraries, helpers and applications easily and support each other in the endeavor to make CodeIgniter better. Essentially, what's good for CodeIgniter is good for GoCart.

Tips from this project you'd like to share?

If you really want something, do it yourself. If it doesn't happen then you probably don't want it as bad as you think.

Lessons you've learned?

- Not every idea is a good one. Generally you need someone else around to discuss ideas and methods with. Collaboration is the best way to build a good application.
- No one knows what the next trend will be. Having a scalable platform that will adjust to a new set of tools and user demands is very important.


If you have a project that you would like to see in our showcase email me

02 Nov 2011 7:31pm GMT

01 Nov 2011

feedNews

eZ Systems takes over High-Tech Gruenderfonds

Successful exit for German IT technology and now one of the services offered by eZ Systems.

With the acquisition of the German high-technology start-up, YOOCHOOSE, the Norwegian company eZ Systems AS is expanding its content management system, eZ Publish Enterprise, with one of the world's leading recommendation engines. YOOCHOOSE was founded in 2009 by Dr. Uwe Alkemper and Michael Friedmann, and convinced High-Tech Gruenderfonds to provide seed financing at an early stage. Behind YOOCHOOSE - a spin-off company from Deutsche Telekom Laboratories in Berlin - lies a high-performance, patented recommendation system, which enables companies to significantly increase their revenues on the Internet using personalized recommendations.

01 Nov 2011 1:07pm GMT

26 Oct 2011

feedNews

eZ Delivers Analytics Optimizing Customer Experience

Through the acquisition of odoscope, eZ extends the powerful eZ Publish content management platform with behavior analysis optimizing the end-customer engagement.

26 Oct 2011 6:53am GMT

23 Oct 2011

feedPlanet TurboGears

Cliff Wells: FreeSWITCH on Scientific Linux 6.1

SL 6.1 (and I assume RHEL and CentOS 6.1 as well) has introduced an issue for building and running FreeSWITCH. Apparently a lot of stuff now relies on dynamically linking to libnss3. libnss3, in turn, depends on libnspr4.so, which depends on libplds4.so. Seemingly, this should not be an issue (stuff depends on chained shared objects all over the place), but somehow it is.

What happens is first you can't compile FreeSWITCH. You get complaints about unresolved symbols in /usr/lib64/libnss3.so. The solution is to run the following commands:

yum install nspr-devel
env LIBS="-lnss3 -lnspr4 -lplds4" ./configure
make && make install

This will get you a compiled version of FreeSWITCH. However, when you actually run it, you'll find that several modules won't load at runtime (including the ODBC driver, should you happen to be using it). The solution for this is similar. Assuming you are using an init script to launch FreeSWITCH, you can add the following line to the top of /etc/init.d/freeswitch:

export LD_PRELOAD="/usr/lib64/libnss3.so /usr/lib64/libnspr4.so /usr/lib64/libplds4.so"

Voila. Everything works. Hopefully the FreeSWITCH devs get on RHEL6 support soon, but meanwhile this should get you by.

23 Oct 2011 3:27pm GMT

20 Oct 2011

feedNews

New Cockpit Available for Better Productivity

eZ Content Cockpit is the latest extension from the eZ Market that offers a cohesive website overview to facilitate better editing and maintenance of dynamic content.

20 Oct 2011 7:43am GMT

18 Oct 2011

feedPlanet TurboGears

Michael Pedersen: Request For Ideas for Hiring Pond

So, a favor to ask of people: I'm working on a web application to help people manage their resumes. As I've gotten further in, I've realized I don't have an actual todo list for it. So, since I'm making this to be used by others, I'll ask everybody here:

What would you want to see? Currently, I've added enough code to allow the program to output something very close to my online resume ( http://www.icelus.org/ ). Next up, I have the following features on my todo list already:




What else would you all want to see in order to make you want to use this?

18 Oct 2011 8:44pm GMT

13 Oct 2011

feedshare.ez.no > Articles and Tutorials

Building native mobile applications with the eZ Publish REST API

eZ Publish is a Web Content Management System that provides a platform to publish content via any channel. Its powerful presentation engine enables you to create websites and pages that display your content in a variety of renderings. Its powerful API directly and simply integrates your content with any web-enabled application on any device, such as the iPad, iPhone, or an Android device, without ever interfering with, or impacting the platform itself.

At the end of this tutorial, you will have learnt the basics of mobile application development for both iOS and Android platforms, consuming content from eZ Publish. CMS-side adjustments for the mobile channel will be acquired too. This cheatsheet will help you leverage the multichannel capabilities of eZ Publish, and its REST API in future projects, in a more systematic fashion.

13 Oct 2011 2:21pm GMT

05 Oct 2011

feedCI News

New User Guide in Development

We are happy to announce today that the user guide has had some significant improvements, and the first commit of these changes were just pushed today.

As many of you likely heard at CICON 2011, the Reactor team has had an internal project going on for some time to move the user guide to Sphinx. In addition to handling the tedium of generating page and document tables of contents, or maintaining internal links and references, the documentation is now easier to write, as you can simply focus on the content instead of markup and presentation. Don't forget syntax highlighting of PHP, HTML, CSS, and JavaScript in code samples. Based on ReStructured Text, it's also more human readable in a text editor than HTML is, which is likely where you spend most of your time. As an added benefit, Sphinx can output HTML, PDF, and even EPUB formats all from the same source files. We will likely be taking advantage of that at a later date.

But we didn't stop there, we also enlisted the thunderous powers of EllisLab's Chief Creative Officer, James Mathias for a style redesign. They are clean, easy to read, and beautiful.

Setting up your dev environment to work with Sphinx (if you want to render and output locally) is very easy, and takes about five minutes. For those that want to geek out, we have added a readme file to the user guide source folder so the step by step instructions are available right from GitHub.

Today marks the first commit with the new user guide to the unreleased develop branch, so you may encounter some bumps. Most notably are the code blocks, which pandoc lost our line breaks on, and some navigation issues as we experiment with different table of contents presentation and depth. We'll be cleaning these up prior to the next release (much is as simple as some line breaks and tabs), but feel free to pitch in and submit some pull requests if you see anything out of whack.

And lastly, for the first time ever, we have live nightly builds of documentation for the develop branch available at the CodeIgniter web site. Enjoy!

05 Oct 2011 7:23pm GMT

04 Oct 2011

feedPlanet TurboGears

Alessandro Molina: TurboGears2 Performance Improvements

As recently some effort has been involved in improving the performances of TurboGears2, I was curious to see how much things improved. As usually, the test isn't really reliable in any way and was just for fun.

All the graphs report the request/sec the application has been able to perform on my computer with only 1 concurrent client. So higher is better.

Here is the comparison between TG2.0 and TG2dev (will be 2.1.4)

I also compared various setups with different template engines on TG2dev

The comparison happened on an application similar to the quickstarted one.
Actually as there is no database involved in this application the template engine impacts a lot and so was a good benchmark for the template engines themselves.

04 Oct 2011 3:35pm GMT

16 Aug 2011

feedshare.ez.no > Articles and Tutorials

Image Maps in ezwebin Banners

Beginners guide for learning how to use image maps in the ezwebin extension.

16 Aug 2011 12:40pm GMT

07 Jul 2011

feedshare.ez.no > Articles and Tutorials

Building mobile browser and hybrid applications with eZ Publish

eZ Publish is a Web Content Management System that provides a platform to publish content via any channel. Its powerful presentation engine enables you to create websites and pages that display your content in a variety of renderings. Its powerful API directly and simply integrates your content with any web-enabled application on any device, such as the iPad, iPhone, or an Android device, without ever interfering with, or impacting the platform itself.

At the end of this tutorial, you will have learnt the basics of mobile application development for both iOS and Android platforms, consuming content from eZ Publish. CMS-side adjustments for the mobile channel will be acquired too. This cheatsheet will help you leverage the multichannel capabilities of eZ Publish, and its REST API in future projects, in a more systematic fashion.

07 Jul 2011 1:29pm GMT

06 Apr 2011

feedcakebaker

Bash autocompletion for Git

One thing I often wished to have when using Git was the ability to autocomplete Git commands and branch names. As I had to learn this week from Markus Prinz' article A few of my Git tricks, tips and workflows, Git comes with an autocompletion script for the Bash shell. But to use the autocompletion, […]

06 Apr 2011 8:36am GMT

01 Apr 2011

feedcakebaker

Array iteration with JavaScript

Till recently I always used a for-loop when I had to iterate over an array in JavaScript. For example: var myArray = [1, 2, 3, 4]; for (var i = 0; i < myArray.length; i++) { console.log(myArray[i]); } However, with ECMAScript 5 the Array object itself got some methods for iteration purposes. With those methods […]

01 Apr 2011 2:51pm GMT

10 Jan 2011

feedcakebaker

2-legged vs. 3-legged OAuth

From emails I receive it seems like there is a bit of confusion about what the terms 2-legged OAuth and 3-legged OAuth mean. I hope I can clear up this confusion with this article (and don't contribute more to the confusion…). In short, they describe two different usage scenarios of OAuth involving two respectively three […]

10 Jan 2011 5:30pm GMT

04 Mar 2010

feedWithCake.com Companies Hiring

qpLogic Europe

We can use immediately an experienced Cake developer for assisting us with developing a multi-lingual application that needs some Jake/Joomla (css) integration. We have continuously Cake projects and prefer to work with a team of individual developers in multiple time zones. Please show me that you are experienced, affordable and have at least 24 hours available per week (40 is better ;-).

04 Mar 2010 11:54am GMT