开发者

Is CMS independent from programming languages?

开发者 https://www.devze.com 2023-03-03 15:15 出处:网络
As the title suggested, can I use CMS like Drupal with other programming languages like Java for jsp? I want to kno开发者_JAVA百科w this before investing time to learn.

As the title suggested, can I use CMS like Drupal with other programming languages like Java for jsp? I want to kno开发者_JAVA百科w this before investing time to learn.

I mean whether I can use Drupal or similar CMS with Java or Ruby or C ... or not. To be more specific, may I process data in Java at back end and send to the CMS for it to do the update automatically?


You can mix and match languages/frameworks/cmses in web applications. There is nothing that forbids this, although it is usually inelegant, frequently wasteful (in terms of system resources), and generally a pain to maintain and extend. I've down this before in the past, merely for the sake of expediency, or when migrating old data, however you are better off using one framework and getting good with it.

If you really want that sort of flexbility I'd recommend django which is an extremely flexible and capable web framework for python. There are several CMSes that have been implemented on top of it (and you could roll your own pretty easily). Django-cms is one of them. It has have very flexible routing and if you wanted to you could easily implement different parts of your application with different languages/frameworks. Django also has a feature which makes it particularly adept at integrating into existing projects, it can inspect your existing database and generate the models needed to interact with it.

There are a few basic approaches you could take if you want to mix and match.

  1. Configure certain urls point to one application and other urls point to another. For instance you could do:

    • http://mysite.com/cms -> drupal (or some other cms)
    • http://mysite.com/blog -> wordpress (or a django app, or a rails app, or whatever)
    • http://mysite.com/gallery -> some other application
  2. Use AJAX and do your front-end with one language/framework and write the back-end stuff in another. You'd use AJAX to call your backend services from the client's end.

  3. Use a job/task queue like Celery (which integrates really nicely with django).

  4. Use messaging to communicate between different parts of your application, with for instance RabbitMQ or ZeroMQ.


No you can't bind it,

Since the one main reason is both Php and JSP require different types of Web Container.

And drupal is made in Php so you cannot bind Java with jsp even using native library api.

0

精彩评论

暂无评论...
验证码 换一张
取 消