[英]Server and client side programming language and frameworks to use in embedded systems
I am going to implement an easy-to-use and eye-catching graphical user interface for management and configuration of an ethernet switch which has a flash (of just 16 MB) mounted in it, which will have an embedded linux, some specialized softwares, CLI and GUI. 我将实现一个易于使用且引人注目的图形用户界面,用于管理和配置以太网交换机,其中安装了一个闪存(仅16 MB),它将具有嵌入式Linux,一些专用软件,CLI和GUI。
I think, I should go for a web-based graphical user interface so that an admin can access it using the switch's IP. 我想,我应该选择一个基于Web的图形用户界面,以便管理员可以使用交换机的IP访问它。 At client side I am thinking of using HTML5 or HTML4 with Javascript as GUI developed in Flex will probably take much more flash space.
在客户端,我正在考虑使用带有Javascript的HTML5或HTML4,因为在Flex中开发的GUI可能会占用更多的Flash空间。
However, I don't have a clear idea of server side technology to be used. 但是,我并不清楚使用服务器端技术。 Should I go for mini-apache for embedded systems with PHP (as I am familiar with Apache+PHP on x86 systems)?
我应该为使用PHP的嵌入式系统寻找mini-apache(因为我熟悉x86系统上的Apache + PHP)? or is there a better alternative?
还是有更好的选择?
Also, should I go for a MVC type of architecture? 另外,我应该选择MVC类型的架构吗? Are there some great MVC frameworks developed for embedded systems?
是否为嵌入式系统开发了一些出色的MVC框架?
Update: 更新:
Basically, I only need to provide a GUI on top of a CLI running on switch. 基本上,我只需要在交换机上运行的CLI之上提供GUI。 Basic workflow of the application will be something like:
应用程序的基本工作流程如下:
You could use an HTTP server library like Onion (in C), GNU libmicrohttpd (in C), or Wt (in C++) to make your own specialized HTTP server (embedded inside your device). 您可以使用像Onion (在C中), GNU libmicrohttpd (在C中)或Wt (在C ++中)的HTTP服务器库来创建您自己的专用HTTP服务器(嵌入在您的设备中)。
You could also use Ocsigen in Ocaml for the same purpose. 你也可以在Ocaml中使用Ocsigen用于同样的目的。
I don't think that embarking a complete HTTP server (apache, or perhaps better lighttpd ) with a PHP stack makes real sense on an embedded device (the code stack would be much bigger). 我不认为使用PHP堆栈启动完整的HTTP服务器(apache,或者更好的lighttpd )在嵌入式设备上是真正意义上的(代码堆会更大)。 On such a device the performance does not matter much (you won't get thousands of HTTP requests per second), but the code space (and process space, ie memory consumption) is quite important.
在这样的设备上,性能并不重要(您每秒不会获得数千个HTTP请求),但代码空间(和进程空间,即内存消耗)非常重要。 (And the specialized web server solution I am suggesting uses only compiled code, which would run faster than interpreted PHP).
(我建议的专用Web服务器解决方案只使用编译代码,运行速度比解释PHP快)。
If you insist on having a lighttpd
or apache
web server in your device -which I believe is wrong-, you could make your application a FastCGI application (and code it in C, C++, Ocaml, ...). 如果您坚持在设备中安装
lighttpd
或apache
Web服务器 - 我认为这是错误的 - 您可以将您的应用程序设置为FastCGI应用程序(并使用C,C ++,Ocaml等编写代码)。
As Simon Richter commented, you could consider making it (also) an SNMP service. 正如Simon Richter评论的那样,您可以考虑将其(也) 设为SNMP服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.