由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 继续挖坑JAVA和C++
相关主题
你们读写数据库,是直接用java hibernate,还是Spring Framework transaction management?学哪一门编程
古狗研究新出炉:C++ Is The Best Performing Language淘宝技术这十年
大家面试FLAG的时候,用什么语言Java的服务器一般运行几个线程比较合适?
请问Java和Java EE的区别是啥?topcoder algorithm open第一轮马上开始了
我现在明白为什么ejb会难了那个 distributed file sysyem 适合我的需求
java and jbossSpark 和 Dynamodb 之间 如何 连接
android developer招人咋还要3年j2ee工作经验? (转载)java development enviornment - software list. Please!!!
我来跟新手说说怎么分辨真牛人和嘴皮牛人吧恨透了以linux为首的open source (转载)
相关话题的讨论汇总
话题: c++话题: sql话题: orm话题: java话题: hibernate
进入Programming版参与讨论
1 (共1页)
B******5
发帖数: 4676
1
前几天在这看到不少比较两种语言的楼,
最近刚开始看JAVA,觉得比C++好不少,
我也不算编程老手,但是觉得JAVA的库似乎比C++强大很多,
Python的库也不少,或许我对C++不够了解?
D*******a
发帖数: 3688
2
你的感觉基本正确
没什么性能需要的话确实没必要用C++

【在 B******5 的大作中提到】
: 前几天在这看到不少比较两种语言的楼,
: 最近刚开始看JAVA,觉得比C++好不少,
: 我也不算编程老手,但是觉得JAVA的库似乎比C++强大很多,
: Python的库也不少,或许我对C++不够了解?

r*********r
发帖数: 3195
3
用过 boost 吗
B******5
发帖数: 4676
4
用过一两个,其实也很强大

【在 r*********r 的大作中提到】
: 用过 boost 吗
s*w
发帖数: 729
5
boost::filesystem::recursive_directory_iterator,很好很强大;唯一的缺点就是
这个boost安装比较麻烦
qt 貌似也很强大,没咋用过
r*********r
发帖数: 3195
6
only a few needs to be compiled/installed.
most are just header files.
also, use linux, and installing boost is a matter of seconds.

【在 s*w 的大作中提到】
: boost::filesystem::recursive_directory_iterator,很好很强大;唯一的缺点就是
: 这个boost安装比较麻烦
: qt 貌似也很强大,没咋用过

r*********r
发帖数: 3195
7
most java libraries are garbages, like jboss, spring, hibernate.
they mostly do one thing: wrap around database library.
if you are an expert on SQL, why would u use those libraries?
most python libraries are wrappers on top of c/c++ libraries.

【在 B******5 的大作中提到】
: 前几天在这看到不少比较两种语言的楼,
: 最近刚开始看JAVA,觉得比C++好不少,
: 我也不算编程老手,但是觉得JAVA的库似乎比C++强大很多,
: Python的库也不少,或许我对C++不够了解?

r*********r
发帖数: 3195
8
if i know SQL, why would i care about jboss, spring, hibernate?
if i use Apache as web server, or i prefer to write my own hi-performance
web server, who gives a damn about tomcat, glassfish?
if i need cross-platform GUI, why wouldn't i use javascript/AJAX?
who would still use the Swing, JFace, or whatever stupid named stuff?
if i need computing intensive numerical simulation, oops, java sucks.
if i need a generic graph algorithm library, is there anything remotely as
good as boost::graph in java? i think not.
g*****g
发帖数: 34805
9
LOL, you sure you know what is jboss, spring and hibernate?
jboss and spring have nothing to do with DB. And hibernate
implements the concept of ORM, which in many cases, can be
more efficient than SQL due to built-in caching, not to mention
productivity.
BTW, Cassandra, the hottest NoSQL DB is implemented purely in Java.
And Facebook uses that.

【在 r*********r 的大作中提到】
: most java libraries are garbages, like jboss, spring, hibernate.
: they mostly do one thing: wrap around database library.
: if you are an expert on SQL, why would u use those libraries?
: most python libraries are wrappers on top of c/c++ libraries.

T*o
发帖数: 363
10
唉,一个个都没完没了了啊。。

【在 r*********r 的大作中提到】
: if i know SQL, why would i care about jboss, spring, hibernate?
: if i use Apache as web server, or i prefer to write my own hi-performance
: web server, who gives a damn about tomcat, glassfish?
: if i need cross-platform GUI, why wouldn't i use javascript/AJAX?
: who would still use the Swing, JFace, or whatever stupid named stuff?
: if i need computing intensive numerical simulation, oops, java sucks.
: if i need a generic graph algorithm library, is there anything remotely as
: good as boost::graph in java? i think not.

相关主题
java and jboss学哪一门编程
android developer招人咋还要3年j2ee工作经验? (转载)淘宝技术这十年
我来跟新手说说怎么分辨真牛人和嘴皮牛人吧Java的服务器一般运行几个线程比较合适?
进入Programming版参与讨论
r*********r
发帖数: 3195
11
orm is unnecessarily complicated. as for performance,
nothing cann't be done on the SQL execution engine level.
i can bet on that since i've written patches for MySQL engine.
hibernate is nothing more than orm. jboss, spring, well, of course
adds the "beans" and then call it "enterprise". i used both jboss and
spring. Those frameworks does nothing but suffocating a programmer.
as for NoSQL, i root for MongoDB. because it's written in c++, i know
it's better than Cassandra.

【在 g*****g 的大作中提到】
: LOL, you sure you know what is jboss, spring and hibernate?
: jboss and spring have nothing to do with DB. And hibernate
: implements the concept of ORM, which in many cases, can be
: more efficient than SQL due to built-in caching, not to mention
: productivity.
: BTW, Cassandra, the hottest NoSQL DB is implemented purely in Java.
: And Facebook uses that.

N********n
发帖数: 8363
12

Writing GUI in Javascript is like driving a pickup truck to race Formula
one. Doable but guaranteed to lose your butt. The TCO of developing in
C++ and these Js junk projects is exorbitant when including in the cost
of defect fixing, maintenance, upgrade and so on.

【在 r*********r 的大作中提到】
: orm is unnecessarily complicated. as for performance,
: nothing cann't be done on the SQL execution engine level.
: i can bet on that since i've written patches for MySQL engine.
: hibernate is nothing more than orm. jboss, spring, well, of course
: adds the "beans" and then call it "enterprise". i used both jboss and
: spring. Those frameworks does nothing but suffocating a programmer.
: as for NoSQL, i root for MongoDB. because it's written in c++, i know
: it's better than Cassandra.

g*****g
发帖数: 34805
13

jboss is an EJB container, I am not a fan of it, but it gets you buit-in
remoting, clustering, transaction, security among others. Spring gets
you those without an EJB container, but Apache Web server doesn't have
the counterpart. You either have to hook up another stack (RoR, Php etc.),
or you have to write your own, and the latter is not realistic.
Sure you can, but again it gets you better productivity, you think Google
compile java code to javascript in gwt for the sake of what?
Probably true, java is not for everything. Although there're situations
where
you can take advantage of Hadoop like framework using a commercial cloud.
Small company can rent a large grid to do intensive computing in that sense.
Check JGraphT

【在 r*********r 的大作中提到】
: if i know SQL, why would i care about jboss, spring, hibernate?
: if i use Apache as web server, or i prefer to write my own hi-performance
: web server, who gives a damn about tomcat, glassfish?
: if i need cross-platform GUI, why wouldn't i use javascript/AJAX?
: who would still use the Swing, JFace, or whatever stupid named stuff?
: if i need computing intensive numerical simulation, oops, java sucks.
: if i need a generic graph algorithm library, is there anything remotely as
: good as boost::graph in java? i think not.

g*****g
发帖数: 34805
14

I don't think it's that complicated. Yes, doing it right needs
some skills, but doing SQL right needs some skills too. At least
you can have some experienced guy doing it and spare rest of the
team on an object model, which is more productive than everybody
doing SQL based on my experience.
True, and caching is the best way to reduce the DB load. ORM gives
you a simple way to do that. I've seen enough companies trying to
do caching with SQL, most end up with their own home-made ORM framework,
only more buggy and less efficient than those popular ones.
Enterprise computing is complicated. That's the part we call "difficult
things are possible". You can call the names all you want but it's not
like you can provide a simpler alternative solution. Guys like Rod Johnson
got rich for inventing Spring for a reason.
I don't know MogoDB and I can't say it's better or worse, but it doesn't
look
like it's more popular. One thing I do know though, in scalability terms, if
Facebook has employed it, most companies can feel safe to do it too.

【在 r*********r 的大作中提到】
: orm is unnecessarily complicated. as for performance,
: nothing cann't be done on the SQL execution engine level.
: i can bet on that since i've written patches for MySQL engine.
: hibernate is nothing more than orm. jboss, spring, well, of course
: adds the "beans" and then call it "enterprise". i used both jboss and
: spring. Those frameworks does nothing but suffocating a programmer.
: as for NoSQL, i root for MongoDB. because it's written in c++, i know
: it's better than Cassandra.

e****d
发帖数: 895
15
Are you sure you are familar with all the concepts you mentioned?
Re-inventing the wheels is not the right way for software development.

【在 r*********r 的大作中提到】
: if i know SQL, why would i care about jboss, spring, hibernate?
: if i use Apache as web server, or i prefer to write my own hi-performance
: web server, who gives a damn about tomcat, glassfish?
: if i need cross-platform GUI, why wouldn't i use javascript/AJAX?
: who would still use the Swing, JFace, or whatever stupid named stuff?
: if i need computing intensive numerical simulation, oops, java sucks.
: if i need a generic graph algorithm library, is there anything remotely as
: good as boost::graph in java? i think not.

B******5
发帖数: 4676
16
呵呵,挖坑就是想集结各位专家对两种语言的了解,
看看回帖觉得两个都挺强大,继续学习JAVA了~
F****n
发帖数: 3271
17
I was a C++ developer more than 10 years. Now I don't want to touch C++ at
all. If I have performance need, I use C. C++ is simply bad (though powerful
) as a programming language.

【在 B******5 的大作中提到】
: 前几天在这看到不少比较两种语言的楼,
: 最近刚开始看JAVA,觉得比C++好不少,
: 我也不算编程老手,但是觉得JAVA的库似乎比C++强大很多,
: Python的库也不少,或许我对C++不够了解?

d****p
发帖数: 685
18
I have a slightly different oponion on orm framework in C++. I think such
stuff is helpful in occasions where DB performance is not that important.
I think pure SQL stuff (a lot of complicated SQL statement) will make the
design view fragmented and cause maintenance issues. I prefer to have core
stuff centralized and unified.
An object DB layer can achieve this purpose (once again, for certain
applications where performance is not that important). Of course such an
extra layer will introduce overhead - but we can contain this problem by
setting up cache or performing compilie time binding between C++ code and
SQL query operations.
Other than that, I agree with you that Boost is awesome and it will make C++
very much usable.

【在 r*********r 的大作中提到】
: orm is unnecessarily complicated. as for performance,
: nothing cann't be done on the SQL execution engine level.
: i can bet on that since i've written patches for MySQL engine.
: hibernate is nothing more than orm. jboss, spring, well, of course
: adds the "beans" and then call it "enterprise". i used both jboss and
: spring. Those frameworks does nothing but suffocating a programmer.
: as for NoSQL, i root for MongoDB. because it's written in c++, i know
: it's better than Cassandra.

g*******e
发帖数: 3013
19
不同工具,要有上下文才可以比较。

【在 B******5 的大作中提到】
: 前几天在这看到不少比较两种语言的楼,
: 最近刚开始看JAVA,觉得比C++好不少,
: 我也不算编程老手,但是觉得JAVA的库似乎比C++强大很多,
: Python的库也不少,或许我对C++不够了解?

h***i
发帖数: 1970
20
facebook现在基本用hbase,Cassandra不太用了,你随便读读他们的blog就行了,
hibernate基本是垃圾,用用spring jdbc template就行了,有啥serious的project用
hibernate?

【在 g*****g 的大作中提到】
: LOL, you sure you know what is jboss, spring and hibernate?
: jboss and spring have nothing to do with DB. And hibernate
: implements the concept of ORM, which in many cases, can be
: more efficient than SQL due to built-in caching, not to mention
: productivity.
: BTW, Cassandra, the hottest NoSQL DB is implemented purely in Java.
: And Facebook uses that.

相关主题
topcoder algorithm open第一轮马上开始了java development enviornment - software list. Please!!!
那个 distributed file sysyem 适合我的需求恨透了以linux为首的open source (转载)
Spark 和 Dynamodb 之间 如何 连接Broken Pipe in connection pooling, envirement: JBOSS+Oracle
进入Programming版参与讨论
h***i
发帖数: 1970
21
mongodb,等等再说吧,lock居然是database level的,连collection level的都不是呢,
等等看吧,不过貌似有前途.

【在 r*********r 的大作中提到】
: orm is unnecessarily complicated. as for performance,
: nothing cann't be done on the SQL execution engine level.
: i can bet on that since i've written patches for MySQL engine.
: hibernate is nothing more than orm. jboss, spring, well, of course
: adds the "beans" and then call it "enterprise". i used both jboss and
: spring. Those frameworks does nothing but suffocating a programmer.
: as for NoSQL, i root for MongoDB. because it's written in c++, i know
: it's better than Cassandra.

h***i
发帖数: 1970
22
GWT

【在 N********n 的大作中提到】
:
: Writing GUI in Javascript is like driving a pickup truck to race Formula
: one. Doable but guaranteed to lose your butt. The TCO of developing in
: C++ and these Js junk projects is exorbitant when including in the cost
: of defect fixing, maintenance, upgrade and so on.

h***i
发帖数: 1970
23
terms, if Facebook has employed it, most companies can feel safe to do :it
too.
facebook真的不太用它,有个用它的,digg, 用的很失败,CTO被fire了.
r*****l
发帖数: 2859
24
Java和C++的用途完全不同的。你要想清楚你想干什么。

【在 B******5 的大作中提到】
: 呵呵,挖坑就是想集结各位专家对两种语言的了解,
: 看看回帖觉得两个都挺强大,继续学习JAVA了~

r*****l
发帖数: 2859
25
做人何必看得那么窄呢。首先,如果你没有到CTO,或者什么senior architecture(指
的是一个大公司就有几个的那种)那个level,就好好考虑做好自己的工作。如果到了
那个level,我考虑的问题是如果雇几个senior java developers还是几个DB experts
能达到同样的效果,到底那个省钱。hibernate这些东西的存在使得雇几个java
developers更便宜些。这就是它们的作用。

【在 r*********r 的大作中提到】
: most java libraries are garbages, like jboss, spring, hibernate.
: they mostly do one thing: wrap around database library.
: if you are an expert on SQL, why would u use those libraries?
: most python libraries are wrappers on top of c/c++ libraries.

r***y
发帖数: 4379
26
对 java guys , 如果不考虑今后换 database , ibatis/mybatis 比 hibernate 容易
用的
多. 而且容易优化 performance.
把 hibernate 用到纯熟, 写出的 ORM code 的 performance 不差的人 SQL skills 绝
对差
不了, 也绝对不会比一个有经验的 DB developer 便宜.

experts

【在 r*****l 的大作中提到】
: 做人何必看得那么窄呢。首先,如果你没有到CTO,或者什么senior architecture(指
: 的是一个大公司就有几个的那种)那个level,就好好考虑做好自己的工作。如果到了
: 那个level,我考虑的问题是如果雇几个senior java developers还是几个DB experts
: 能达到同样的效果,到底那个省钱。hibernate这些东西的存在使得雇几个java
: developers更便宜些。这就是它们的作用。

M**u
发帖数: 10158
27
re

powerful

【在 F****n 的大作中提到】
: I was a C++ developer more than 10 years. Now I don't want to touch C++ at
: all. If I have performance need, I use C. C++ is simply bad (though powerful
: ) as a programming language.

g*****g
发帖数: 34805
28
ORM is simply object query translated to SQL, no way it beats
SQL in performance directly. However, much of optimization comes
from caching, which is a simple plugin for ORM, and a lot of work
without it.

【在 r***y 的大作中提到】
: 对 java guys , 如果不考虑今后换 database , ibatis/mybatis 比 hibernate 容易
: 用的
: 多. 而且容易优化 performance.
: 把 hibernate 用到纯熟, 写出的 ORM code 的 performance 不差的人 SQL skills 绝
: 对差
: 不了, 也绝对不会比一个有经验的 DB developer 便宜.
:
: experts

o**1
发帖数: 6383
29
mybatis 也支持 caching. hibernate太复杂了,除非有大牛搞的很清楚,否则用点高
级的花的时间要比用 mybatis 或者 jdbc 多多了。

【在 g*****g 的大作中提到】
: ORM is simply object query translated to SQL, no way it beats
: SQL in performance directly. However, much of optimization comes
: from caching, which is a simple plugin for ORM, and a lot of work
: without it.

l******e
发帖数: 12192
30
mybatis也不是很方便,当然比hibernate还是强点

【在 o**1 的大作中提到】
: mybatis 也支持 caching. hibernate太复杂了,除非有大牛搞的很清楚,否则用点高
: 级的花的时间要比用 mybatis 或者 jdbc 多多了。

相关主题
现在主流web server是什么?古狗研究新出炉:C++ Is The Best Performing Language
微软所有产品都是廉价货大家面试FLAG的时候,用什么语言
你们读写数据库,是直接用java hibernate,还是Spring Framework transaction management?请问Java和Java EE的区别是啥?
进入Programming版参与讨论
r***y
发帖数: 4379
31
是啊, 如果 performance 是 big concern 的话, 肯定不会 orm 或 data mapping 了.
就从 productivity 角度考虑, 那个 hibernate 的 query object feature 在
business
logic 不复杂的时候的确省事. 一旦把原先复杂的 sql 用 orm 来解决的时候, 真情愿
继续用小米
加步枪的 jdbc 了. productivity 实在不敢恭维. 至少是learning curve is way too
deep.
还是 mybatis 比较折中. spring jdbc template 自动化程度还是偏低些.
PS: lz 是问 c++ or java 的, 咱们把楼给起的歪大发了... 呵呵

【在 o**1 的大作中提到】
: mybatis 也支持 caching. hibernate太复杂了,除非有大牛搞的很清楚,否则用点高
: 级的花的时间要比用 mybatis 或者 jdbc 多多了。

e****d
发帖数: 895
32
ORM很慢吗? 今天听人说secdb是建立在ORM上的,不知是否。

了.
too

【在 r***y 的大作中提到】
: 是啊, 如果 performance 是 big concern 的话, 肯定不会 orm 或 data mapping 了.
: 就从 productivity 角度考虑, 那个 hibernate 的 query object feature 在
: business
: logic 不复杂的时候的确省事. 一旦把原先复杂的 sql 用 orm 来解决的时候, 真情愿
: 继续用小米
: 加步枪的 jdbc 了. productivity 实在不敢恭维. 至少是learning curve is way too
: deep.
: 还是 mybatis 比较折中. spring jdbc template 自动化程度还是偏低些.
: PS: lz 是问 c++ or java 的, 咱们把楼给起的歪大发了... 呵呵

b******n
发帖数: 592
33
You need to have your own set of library if you use C (data structures and s
o on). It is very necessary for every C programmer.
I like a few things about C++, template is one of them. And C++ standard lib
rary provides a lot more functionality with C. Though I would agree with you
.

【在 M**u 的大作中提到】
: re
:
: powerful

1 (共1页)
进入Programming版参与讨论
相关主题
恨透了以linux为首的open source (转载)我现在明白为什么ejb会难了
Broken Pipe in connection pooling, envirement: JBOSS+Oraclejava and jboss
现在主流web server是什么?android developer招人咋还要3年j2ee工作经验? (转载)
微软所有产品都是廉价货我来跟新手说说怎么分辨真牛人和嘴皮牛人吧
你们读写数据库,是直接用java hibernate,还是Spring Framework transaction management?学哪一门编程
古狗研究新出炉:C++ Is The Best Performing Language淘宝技术这十年
大家面试FLAG的时候,用什么语言Java的服务器一般运行几个线程比较合适?
请问Java和Java EE的区别是啥?topcoder algorithm open第一轮马上开始了
相关话题的讨论汇总
话题: c++话题: sql话题: orm话题: java话题: hibernate