blog.dopana

Quay lại

EmDash là một CMS hiện đại được xây dựng trên TypeScript và Cloudflare, được thiết kế như “spiritual successor” của WordPress. Sau khi sử dụng cả hai, tôi nhận thấy EmDash mang lại những lợi ích đáng kể trong kỷ nguyên AI.

Tại sao xem xét EmDash thay vì WordPress?#

WordPress đã thống trị web hơn 20 năm, nhưng nó được xây dựng cho một kỷ nguyên khác - khi PHP và LAMP stack là tiêu chuẩn. EmDash được thiết kế từ đầu với serverless, TypeScript, và AI Agent.

Bảng so sánh nhanh#

Tiêu chíEmDashWordPress
Ngôn ngữTypeScript / AstroPHP
HostingCloudflare Workers (serverless)PHP server bất kỳ
DatabaseD1 (serverless SQLite)MySQL
Plugin securitySandboxed Dynamic WorkersFull server access
EcosystemBeta v0.1 (2026)20 năm, 60,000+ plugins
TTFB (cached)10-30ms200-500ms
Hosting cost$0/month (free tier)$25-50/month (managed)
AI integrationBuilt-in MCP serverREST API (bolt-on)

1. Bảo mật: Plugin Security Model#

Đây là lý do quan trọng nhất khiến tôi xem xét EmDash.

Vấn đề với WordPress Plugins#

Theo Patchstack, 96% lỗ hổng bảo mật WordPress đến từ plugins, không phải WordPress core. Trung bình mỗi tuần có hơn 333 lỗ hổng plugin mới được phát hiện, và thường hơn 200 lỗ hổng không có patch tại thời điểm disclosure.

WordPress plugins chạy như PHP scripts trên server của bạn với cùng quyền hạn như WordPress. Điều này có nghĩa là:

  • Direct read/write access vào toàn bộ database
  • Có thể đọc mọi post, user record, password hash
  • Có thể execute arbitrary SQL queries
  • Có thể read/write files trên filesystem
  • Có thể make outbound HTTP requests

Tất cả điều này có sẵn theo mặc định, không có permission system hay isolation.

EmDash Sandboxed Plugins#

EmDash chạy mỗi plugin trong isolated sandbox gọi là Dynamic Worker (V8 isolate). Mỗi plugin phải declare capabilities upfront trong manifest file, tương tự như mobile apps request permissions.

WordPressEmDashEmDashThêm tính năng vào websitePluginChạy plugin trên hệ sinh tháiWordPressDependency + Update +CompatibilitySecurity & MaintenanceSandboxed PluginGiới hạn quyền truy cậpIsolated RuntimeKiểm soát phạm vi ảnh hưởngkhi plugin gặp sự cốDevelopment

Plugin gửi email sau khi content saved phải declare chính xác 2 capabilities: read:content và email:send. Nó không thể:

  • Touch database
  • Access filesystem
  • Make network requests đến bất kỳ domain nào không được declare

Nếu plugin bị compromise, blast radius được chứa trong sandbox của nó. Nó không thể reach plugins khác, data của bạn, hay infrastructure của bạn.

[!NOTE] Cloudflare’s announcement led with security for a reason - it’s the most defensible technical argument EmDash has.

2. Chức năng cơ bản#

Về cơ bản, EmDash và WordPress khá tương đồng về chức năng:

  • Content Management (CMS): Cả hai đều có admin interface để quản lý content
  • SEO: Cả hai đều hỗ trợ SEO basics (meta tags, sitemaps, structured data)
  • Blog: Cả hai đều có blog functionality với posts, categories, tags
  • Media Library: Cả hai đều có media management

Đối với general content sites, cả hai đều có thể sử dụng tương đương.

3. Developer Experience#

WordPress Challenges#

Từ góc độ developer, WordPress khá khó làm việc:

  • Codebase lớn: Rất khó hiểu và modify existing code
  • Git integration: Version management phức tạp với plugins
  • Dependency management: Plugin dependencies gây ra conflicts
  • PHP performance: So với Node.js, PHP có thể bất lợi trong nhiều cases
  • Update compatibility: WordPress updates có thể break old plugins
  • Legacy codebase: Understanding và fixing existing WordPress code là thách thức

EmDash Advantages#

  • TypeScript: Type-safe từ đầu
  • Modern tooling: npm, modern build systems
  • Git-native: Version control là first-class citizen
  • No legacy debt: Modern architecture từ đầu
  • Astro SSR/SSG: Performance tốt với modern rendering strategies

4. Infrastructure Costs#

WordPress Hosting#

Đối với general content sites không cần massive traffic:

  • Server/hosting cost: $5-20/month là typical
  • Managed hosting: $25-50/month
  • Cần maintain server, PHP updates, MySQL optimization
  • Cần caching layers, CDN setup

EmDash on Cloudflare#

EmDash sử dụng Cloudflare infrastructure:

  • Free tier: Có thể chạy small sites trong free tier
  • Serverless: Không có server để crash hay patch
  • Global edge: Runs in 300+ data centers worldwide
  • Deployment: git push - Cloudflare builds và deploys automatically
  • No operating system: Không có OS để patch
  • No MySQL optimization: D1 handles database tại edge

Trade-off: locked vào Cloudflare ecosystem. Nhưng đối với nhiều sites, đó là acceptable trade-off cho cost và performance benefits.

5. AI Era Development Costs#

Trong kỷ nguyên AI-driven development, EmDash có lợi thế đáng kể:

WordPress Challenges#

  • Plugin dependency: Often phải rely trên existing plugins
  • Legacy codebase: AI có khó khăn understanding massive WordPress codebase
  • Update issues: Plugin updates có thể break existing logic
  • Complex debugging: Understanding existing plugin logic là thách thức

EmDash Advantages#

  • Custom development: Không cần rely hoàn toàn vào plugins
  • Modern stack: AI works better với TypeScript/Astro codebase
  • Flexible architecture: Có thể build exactly what needed
  • Optimized solutions: Có thể optimize performance cho specific requirements
  • No legacy debt: Starting fresh với modern patterns

6. AI Agent Content Management#

Đây là một major advantage của EmDash.

EmDash MCP Support#

EmDash có built-in MCP (Model Context Protocol) server, cho phép AI Agents:

  • Create content trực tiếp từ CMS
  • Update content programmatically
  • Manage content qua AI agents
  • New CMS usage patterns beyond traditional admin UI

WordPress AI Integration#

WordPress có thể integrate với AI agents, nhưng:

  • Cần build REST API integration
  • Cần custom plugins
  • Cần additional infrastructure
  • Not native - bolt-on solution

[!TIP] EmDash is AI-native - MCP support is built-in from day one.

7. User Permission Management#

EmDash có simpler, more intuitive permission system:

UserRoleSubscriberContributorAuthorEditorAdminXem nội dung đã xuất bảnTạo nội dungYêu cầu phê duyệtTạo, chỉnh sửa và xuất bản nộidung của mìnhQuản lý nội dung toàn đội ngũTruy cập tất cả tính năngUsers / Settings / Plugins /Schema

EmDash permissions are:

  • More intuitive
  • Easier to understand
  • Simpler to configure
  • Better aligned với modern RBAC patterns

8. Sao lưu (Backup)#

Việc backup WordPress có thể rất phức tạp. Bạn cần sao lưu cả database lẫn các file mã nguồn/dữ liệu. Mỗi khi cập nhật điều gì đó, bạn lại phải backup lại một lần nữa. Khi website lớn dần lên, tầm 3 GB hay 5 GB, bạn sẽ cần đến các công cụ bên ngoài để backup dữ liệu. Việc thực hiện một thao tác backup đơn giản cũng tốn rất nhiều thời gian. Đây là pain point lớn đối với nhiều người dùng WordPress.

Với EmDash, việc backup thậm chí còn đơn giản hơn nhiều. Bạn có thể dùng git để backup toàn bộ website, bao gồm cả các file được tải lên. Toàn bộ database của bạn thực chất chỉ là một file SQLite duy nhất. Mỗi lần bạn git commit, bạn đã nắm trong tay một bản backup hoàn chỉnh của toàn bộ site. Quá trình backup chỉ đơn giản như một lệnh git push, còn restore cũng dễ dàng như một lệnh git checkout.

Conclusion: Why EmDash?#

Tôi không bị thu hút bởi EmDash chỉ vì “nhiều tính năng hơn WordPress”. Lý do chính là:

  1. Modern Architecture: Cloudflare + TypeScript + Sandboxed Plugins + AI-native
  2. Security First: Plugin sandboxing solves fundamental WordPress security problem
  3. Performance: Serverless edge deployment with global distribution
  4. Developer Experience: Modern tooling, type-safe, git-native
  5. Cost Effective: Can run on free tier for many use cases
  6. AI Native: Built-in MCP support for AI agents
  7. No Legacy Debt: Starting fresh với 2026 standards

EmDash là “WordPress would look like if built from scratch today” - và đó là một good thing.

Tài liệu tham khảo#