“耳朵”的展开时间使用 jboss、ant、jsp 和史前电脑很烦人

发布于 2024-09-25 01:39:51 字数 324 浏览 6 评论 0原文

我正在开发一个基于网络的java应用程序,在jboss和sql服务器上运行。

我似乎发现自己花费了大量的时间重新编译/部署只是为了调整 jquery/javascript/css/html 中的界面。

有什么减少周转时间的技巧吗?

它部署到一个ear文件,所以我无法在部署后更改jsps/javascript(?)。是的,我已经创建了网页前端的静态版本,但它们没有为我提供完整的功能 - 没有来自 db/jstl 处理的数据。

澄清一下,与其说实际编译时间本身(30秒),不如说ant构建设置得很好并且非常模块化;真正令人头疼的是随后部署到 jboss 并访问应用程序。

I am developing a web based java app, running on jboss and sql server.

I seem to find myself spending an inordinate amount of time recompiling/deploying just to tweak the interface in jquery/javascript/css/html.

Any tips for reducing the turnaround ?

Its deployed to an ear file, so I can not alter the jsps/javascript after deployment(?). Yes, I have created the a static version of the webpage frontends but they do not give me the full functionality - none of the data from db/jstl processing.

To clarify its not so much the actual compile time itself (30seconds) as the ant builds are set-uo well and are very modular; its the subsequent deployment to jboss and accessing the application that cause the real headache.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

隐诗 2024-10-02 01:39:51

如果您不直接在 JBoss 的 hotdeploy 文件夹内的爆炸战争中工作,那么请强烈考虑它。

If you do not work directly in an exploded war inside the hotdeploy folder of JBoss, then strongly consider it.

酷炫老祖宗 2024-10-02 01:39:51

在使用应用程序服务器进行开发时,我过去使用过此产品:来自zeroturnaround的JRebel

它将避免重新启动和重新部署在应用程序服务器中运行的应用程序。它适用于大多数情况,但是我发现在某些情况下需要重新启动服务器(在我的情况下对应用程序初始化进行更改)。但是,如果您只在界面上工作,那么该产品将为您节省大量部署和重新启动的次数。

我没有将 Jrebel 与 JBoss 结合使用,但他们提到它是受支持的容器,所以这应该不是问题。

when developing with application server i've used this product in the past: JRebel from zeroturnaround.

It will prevent having to restart and redeploy an application running within an application server. It works for most scenario's however i found that there were a few occasions when a server restart were required(in my case making changes to the application initialisation). But if you're only working on the interface this product will save you a great number of deployments and restarts.

I have not used Jrebel in combination with JBoss but they mention it as a supported container so thta shouldn't be a problem.

孤单情人 2024-10-02 01:39:51

我是一名普通的网页设计师(充其量是!),编写复杂的 HTML 和 CSS 对我来说是一种痛苦。我对样式和布局所做的很多工作都是反复试验,涉及大量调整。我也经常改变主意到底我想要什么颜色的东西。基本上,我和你处境相同。

很久以前,我放弃了调整-部署-测试迭代周期的想法(在我当前的项目中,mvn clean tomcat:deploy需要 2 分钟),因为在第 10 次迭代时,我试图对一个简单的布局问题进行排序并等待因为部署会让我陷入困境。我现在使用两种策略;

  1. 获取我想要使用的 HTML 的静态副本。这通常意味着部署应用程序、导航到页面并将其保存到某个工作目录中。这将保存静态 HTML 以及任何图像。接下来,我将工作区中的 CSS 文件复制到工作目录中,并手动编辑保存的 HTML 文件以指向这些 CSS 文件。

  2. 在 Firefox 中打开静态 HTML 页面。现在我可以调整 CSS 或 HTML,只需刷新 Firefox 即可显示更改。迭代时间现在已降至约 1 秒。我可以使用 Firebug 插件进一步改进我的调整。这允许您在 Firefox 中操作 CSS 和 HTML。这对于获得正确的边距和填充大小特别有用。在 Firebug 中对其进行调整后,我会手动编辑保存的 HTML 和 CSS,然后刷新 Firefox 以确保我对结果感到满意。

在某些关键阶段,我会对工作区进行更改,以反映我对静态文件的调整。然后我重新部署并测试以确保我做得正确。当我使用 Firefox 进行所有开发时,我必须特别注意浏览器兼容性,尤其是 IE,但这通常会在稍后阶段出现。

编辑:
我没有提到 Javascript,但这个过程对于 JS 也很有效!

I am an average web designer (at best!) and writing complicated HTML and CSS is a pain for me. A lot of what I do with styles and layout is trial and error and involves a lot of tweaking. I also change my mind frequently about exactly what shade of color I want things. Basically, I'm in the same boat as you.

Long ago I abandoned the idea of the tweak-deploy-test iteration cycle (mvn clean tomcat:deploy takes 2 minutes on my current project) as by the 10th iteration trying to sort a simple layout problem and waiting for the deployment would drive me round the bend. I now use two strategies;

  1. Get a static copy of the HTML I want to work with. This usually means deploying the app, navigating to the page and saving it to a work directory somewhere. This saves the static HTML as well as any images. Next I copy the CSS files from my workspace into the work directory and hand edit the saved HTML file to point to these CSS files.

  2. Open the static HTML page in Firefox. Now I can tweak the CSS or HTML and simply refresh Firefox to show the changes. Iteration time is now down to about 1 second. I can further improve my tweaking using the Firebug addon. This allows you to manipulate the CSS and HTML from within Firefox. This is especially useful for getting margin and padding size right. Once I've tweaked it in Firebug I hand edit the saved HTML and CSS then refresh Firefox to make sure I'm happy with the result.

At certain key stages I then make the changes to my workspace to reflect my tweaking on the static files. I then redeploy and test to make sure I got it right. As I use Firefox for all my development I have to pay special attention to browser compatibility, especially with IE, but this usually comes at a later stage.

Edit:
I didn't mention Javascript, but this process works great for JS too!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文