Proyecto de la semana: WordPress para ordenador
Esta semana nos hemos puesto al día con gente en Automático a hablar sobre WordPress Desktop, un cliente de escritorio de código abierto para gestionar el contenido de WordPress.
Todos saben sobre WordPress, ¿pero qué hay sobre WordPress para ordenador?
La aplicación para ordenador de WordPress.com brinda una buena experiencia multiplataforma que le permite enfocarse en el contenido y el diseño sin pestañas del navegador como distracciones — o para tener tus sitios al margen pero accesibles. En combinación con nuestro soporte para navegador y la aplicación móvil, puede construir su sitio web en cualquier lugar, de cualquier manera que le permita realizar su trabajo.
¿Por qué construir una aplicación de ordenador para administrar sitios de WordPress? ¿No se puede basar todo en la web?
Realmente, está utilizando la misma tecnología que obtienes al visitar WordPress.com en el navegador. Sin embargo, todo se encuentra almacenado localmente, por lo que tiene unos tiempos de carga mínimos. Con el beneficio de características nativas como acceder al docs, las notificaciones, etc., realmente puede enfocarte en tus blogs y sitios de WordPress.
¿Por qué eligieron construir WordPress para ordenador en Electron?
A finales de 2015 reconstruimos gran parte de WordPress.com en la forma de Calypso, una moderna aplicación JavaScript de código abierto utilizando React. Comenzamos echando un ojo a Electron y con algunos cambios realizados a Calypso, fuimos capaces de lograr que se ejecute localmente. Fue una experiencia convincente y pensamos que tenía mucho valor desarrollarla aún más.
Varios equipos estaban trabajando en Calypso. Para hacer un completo cliente multiplataforma que concuerde con esto utilizando tecnologías tradicionales de escritorio hubiese requerido más trabajo. By using Electron, a small team of 2-4 of us were able to leverage the other team’s efforts and build the Desktop app in a couple of months.
What are some challenges you've faced while building WordPress Desktop?
We got an initial version of the app running very quickly, but tuning it to behave optimally as a desktop app took a lot more time. One big challenge with the app is that you're actually running a copy of Calypso on your own machine - it’s purely an API driven UI. There was a lot of bridging work involved in this, and changes were fed back to Calypso itself.
Additionally a lot of effort was spent packaging the app for different platforms - we provide Windows, macOS, and Linux versions - and there are sufficient differences to make this tricky.
At the time Electron was relatively new and we kept running into issues that were shortly fixed (sometimes the same day!)
¿En qué áreas debe mejorarse Electron?
Electron already provides most of what we need for the Desktop app, and it's progressed rapidly since we started using it. That said, there are some areas that are taken for granted in a desktop app, such as spell checking and find/replace, that are harder to replicate with Electron as-is.
We’d also love to see some of the newer Chrome technologies filtering down into Electron too. We’re particularly keen on experimenting with WebVR.
¿Qué es lo que más le gusta de Electron?
The main reason we chose Electron, and it's biggest strength, is the very active and open community. Automattic has always believed in open source. It is one of our core tenets, and the Electron project and community follows a lot of the core beliefs of being very open and positive.
What's coming next in WordPress Desktop?
The great thing about our model is that the Desktop app benefits from any new Calypso feature - there are constant improvements. We’re hoping we can add additional features to the app such as offline support, which would really take the app into native territory, and better system notifications.
Are there any teams at Automattic working on other Electron apps?
Yes, after our efforts on the Desktop app, the Simplenote team decided to use Electron to build desktop apps for Windows and Linux (a native Mac client already exists). The Simplenote Electron app is also open source and available on Github.
We've also got an upcoming Raspberry Pi integration that uses Electron.
If any of that sounds interesting then we'd love to hear from you!
¿Algún consejo sobre Electron que pueda ser útil para otros desarrolladores?
The process of shipping signed desktop software is relatively new to us, especially for Windows. we wrote up an article for Code Signing a Windows App which includes the process and a few of the hurdles we went through to do it right.