最近,我开始着手开发Java的Android应用程序。这对我来说是非常新的,因为我的经验是使用PHP进行web开发。但我也需要非常快地适应桌面环境(即Windows)。
为了稍微缓和学习曲线,是否有类似于Android框架的Java桌面开发框架?当谈到桌面应用程序时,您会推荐哪些Java和/或MVC框架、工具包和/或库给那些只有Android才是真正的Java/GUI体验的人呢?
Notes
- Android does a ton of the boilerplate work for you, and you just fill in the rules that make your app unique.
- Android allows you to use XML files to describe the presentation's physical layout, which is nice for keeping the code that handles user interactions separate from the code that describes the layout.
- Android provides a very user-friendly SDK and entire tool stack that makes it super easy to jump in, experiment, and learn.
发布于 2014-02-08 04:48:14
你可以试试Apache Pivot。它使用XML文件来定义用户界面的内容。UI类包括窗口、对话框、按钮、列表、文本输入、布局、拖放和其他。
正如Apache Pivot站点所说:
Pivot允许开发人员使用Java或任何其他JVM语言(如JavaScript、Groovy或Scala )轻松地构建可视化、跨平台的连接应用程序。 支点使开发人员能够使用他们已经知道的工具构建解决方案,从而缩短交付时间和减少技术扩展。
下面是用于创建"Hello“应用程序UI的XML示例:
<Window title="Hello BXML!" maximized="true"
xmlns:bxml="http://pivot.apache.org/bxml"
xmlns="org.apache.pivot.wtk">
<Label text="Hello BXML!"
styles="{font:'Arial bold 24', color:'#ff0000',
horizontalAlignment:'center', verticalAlignment:'center'}"/>
</Window>
或简单应用程序GUI的另一个例子:
<Window title="Hello" maximized="true"
xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk">
<content>
<BoxPane styles="{padding:4, horizontalAlignment:'center', verticalAlignment:'center'}">
<Label wtkx:id="label1" text="Please enter your name"
styles="{font:'Arial 20', color:'#ff0000',
horizontalAlignment:'center', verticalAlignment:'center'}"/>
<TextInput wtkx:id="text1" />
<PushButton wtkx:id="button1" buttonData="Enter"/>
</BoxPane>
</content>
</Window>
它在某种程度上类似于Android架构。
发布于 2011-12-26 16:51:14
对于桌面来说,没有什么与Android /架构类似的了。
这两个java桌面播放器是秋千 (原始的跨平台ish GUI)和SWT (Eclipseand本机组件)。格里芬是一个桌面Groovy框架,它抽象了大量的工作。
根据您的需要,在Eclipse或NetBeans中构建一个富客户机是一种选择。
构建一个丰富的基于web的平台甚至可能是有意义的;您可以使用任意数量的Java技术使用嵌入式服务器进行分发--这通常是最方便的,尤其是如果您希望能够跨平台承载相同的功能,或者在允许本地部署的同时将其作为服务进行营销。
发布于 2011-12-26 16:46:49
如果你的动机真的是Android应用程序开发,我建议不要担心Java,因为两者是不同的世界。Android确实使用面向Java /对象作为开发语言(sytaxeandemanticestical),但它并不关心Java和其他一些apis。如果您真的想学习Java桌面GUI,那么很少有称为Swing的软件包。你可以看看那些。
https://stackoverflow.com/questions/8637529
复制相似问题