|
UNLESS you are using an ORM then you can just deploy your schema. you are using an ORM right??
|
# ? Sep 25, 2013 17:31 |
|
|
# ? May 13, 2024 03:15 |
|
on the input side, no its sql queries in perl, but for the django bit i'm using a model as per the book (which took my db structure without complaints) and i retrieve stuff with objects.order_by and poo poo. best i can answer u right now
|
# ? Sep 25, 2013 17:33 |
|
i ended up using dbix::class::schema::loader to generate a schema from the clients mysql table, then deployed that schema through dbix::class::schema->deploy() to a postgresql db
|
# ? Sep 25, 2013 17:37 |
|
if you're interested in lookin at database stuff a lil more in depth, a book i got recommended a while back (and am really enjoying) is Seven Databases in Seven Weeks
|
# ? Sep 25, 2013 17:49 |
|
postgres can be super complicated but i'm using it as babbys first rdbms and it seems ok. bigger problem for me right now is that my options for using it are "write sql" or "use these 3mbs of jars and 100 lines of xml"
|
# ? Sep 25, 2013 18:00 |
dbs are easy w/activerecord
|
|
# ? Sep 25, 2013 18:04 |
|
uG posted:i ended up using dbix::class::schema::loader to generate a schema from the clients mysql table, then deployed that schema through dbix::class::schema->deploy() to a postgresql db ill, thanks. i'll goof this weekend
|
# ? Sep 25, 2013 18:10 |
|
Posting Principle posted:postgres can be super complicated but i'm using it as babbys first rdbms and it seems ok. bigger problem for me right now is that my options for using it are "write sql" or "use these 3mbs of jars and 100 lines of xml" postgresql is the simplest rdbms on the market, which is what drives DBAs crazy. there are relatively few tunables, no query hinting, etc for using it from java, the easiest way to not-write-sql is to use hibernate criteria + hibernate annotations. unfortunately i don't know of any easy tutorials other than like, buynig a book or port to scala and use squeryl.
|
# ? Sep 25, 2013 18:10 |
|
also in java always expect to use 3 mb of jars. just get maven set up once, add the dependency, and the 300 mb of jars appears by magic in classpaths and poo poo
|
# ? Sep 25, 2013 18:11 |
|
lightweight activerecord-type stuff is a-ok but real orms are awful. they generate terrible sql and if you're on mysql you can't afford any inefficiency. Posting Principle posted:postgres can be super complicated but i'm using it as babbys first rdbms and it seems ok. bigger problem for me right now is that my options for using it are "write sql" or "use these 3mbs of jars and 100 lines of xml" and then there are the people that generate those 100 lines of XML, or SQL translated verbatim into obtuse object-oriented method calls, and somehow think it's an improvement over a plain ol' goddamned SQL query
|
# ? Sep 25, 2013 18:11 |
|
Tiny Bug Child posted:lightweight activerecord-type stuff is a-ok but real orms are awful. they generate terrible sql and if you're on mysql you can't afford any inefficiency. wow one right post one wrong post youve blaanced your karma very nice
|
# ? Sep 25, 2013 18:16 |
|
Spring Data JPA takes in JPA entities and produces DAOs, plus of course it interoperates with other Spring stuff like transaction management. It's my go-to for dumb database things. The only real downside is that last I checked you basically had to use their XML config as there wasn't any annotation like @EnableWebMvc and making the beans yourself is a PITA.
|
# ? Sep 25, 2013 18:19 |
|
Notorious b.s.d. posted:also in java always expect to use 3 mb of jars. just get maven set up once, add the dependency, and the 300 mb of jars appears by magic in classpaths and poo poo You should just drop the loving jars in your application servers lib dir so you don't need to gently caress around with any of that poo poo.
|
# ? Sep 25, 2013 18:23 |
|
Hard NOP Life posted:You should just drop the loving jars in your application servers lib dir so you don't need to gently caress around with any of that poo poo. maven's for building, not for running applications
|
# ? Sep 25, 2013 18:26 |
|
Jonny 290 posted:ill, thanks. i'll goof this weekend im still sort of a scrub but i do django things to recieve income so feel free to ask when you fall into a noob pitfall also #django on freenode has been a good resource for me, theres a lot of dudes who sit on there at their jobs all day and they will always help with ur stupid problems
|
# ? Sep 25, 2013 18:29 |
|
Hard NOP Life posted:You should just drop the loving jars in your application servers lib dir so you don't need to gently caress around with any of that poo poo. you can do that if you know its the only app running there or if everyone swears to use the same dependencies, otherwise its a bad idea. either way when building the project you'll still want the libs reference in your pom. if they're provided by the server you can mark them as provided (for example: servlet-api should probably always be marked as provided if ur deploying to tomcat/jetty). Either way it lists everything the project needs to run and/or compile so if you change stuff in the future you don't have to hunt down the server config to figure out what was provided.
|
# ? Sep 25, 2013 18:31 |
|
Here's the 30-second thing on why I think Spring Data JPA is cool. First you tell it to look for repository interfaces with <jpa:repositories base-package="my.package.is.large"/> and it will go find all your interfaces that extend JpaRepository. Then it looks up the JPA entity associated with each repo interface and generates an implementation for the interface. So you get basic DAO methods for free, findByID, save, create, whatever. Then you can also define methods on your repo interfaces and Spring Data JPA will read the name + signature to generate an appropriate implementation. Looking at this repo interface: code:
edit: Also you can annotate methods to specify SQL for them, if you want something more complex than the declaration parser can handle or if you're Shaggar. Nomnom Cookie fucked around with this message at 18:35 on Sep 25, 2013 |
# ? Sep 25, 2013 18:31 |
|
see I like mybatis-spring cause I can do likeJava code:
XML code:
|
# ? Sep 25, 2013 18:36 |
|
ahhhh I love spring-mybatis! is so good!
|
# ? Sep 25, 2013 18:39 |
|
that mybatis thing actually seems pretty cool. does the Boner class still need any annotations? how much of spring do you need to bring in to do that?
|
# ? Sep 25, 2013 18:42 |
|
No. I have 0 annotations anywhere in my code cause I'm just injecting everything. I don't even use transaction annotations cause I use a pointcut to specify the transaction manager in spring.
|
# ? Sep 25, 2013 18:47 |
|
Shaggar posted:see I like mybatis-spring cause I can do like Spring Data JPA supports that style via JPA named queries.
|
# ? Sep 25, 2013 18:48 |
|
Shaggar posted:
that's pretty cute
|
# ? Sep 25, 2013 18:49 |
|
Posting Principle posted:that mybatis thing actually seems pretty cool. does the Boner class still need any annotations? how much of spring do you need to bring in to do that? Spring Data JPA allows you to go full Shaggar and configure everything in XML including entity mappings. Sane people will use the JPA entity annotations.
|
# ? Sep 25, 2013 18:50 |
|
Mybatis gives you more flexibility with result mapping, Spring Data JPA will generate queries from your method declarations.
|
# ? Sep 25, 2013 18:54 |
|
Notorious b.s.d. posted:that's pretty cute you can also configure what mappers it creates and how and what it binds them to but if everything is named the same I don't see the point so I let it auto wire it all. it rules. Nomnom Cookie posted:Mybatis gives you more flexibility with result mapping, Spring Data JPA will generate queries from your method declarations. since all my queries are procs result mapping is generally what im gonna spend most of my time on. if your result columns match your result class fields mybatis will auto map them too (I assume spring jpa does that too tho)
|
# ? Sep 25, 2013 18:59 |
|
bringing in spring kind of seems like overkill for such a small project, maybe next time
|
# ? Sep 25, 2013 19:10 |
|
spring is magic. it can be used for great good or for terrible evil. u said u were using cxf right? cxf uses spring for configuration.
|
# ? Sep 25, 2013 19:19 |
|
Shaggar posted:spring is magic. it can be used for great good or for terrible evil. i didn't realize that. i'll probably have time to work on it this weekend so i'll look into spring jpa. i also need to mavenize the project, because right now IDEA is handling all the dependencies. might as well do these things right
|
# ? Sep 25, 2013 20:47 |
|
tell hn: i'm an idiot retard who can't manage a java project
|
# ? Sep 25, 2013 20:50 |
|
Shaggar posted:you can do that if you know its the only app running there or if everyone swears to use the same dependencies, otherwise its a bad idea. either way when building the project you'll still want the libs reference in your pom. if they're provided by the server you can mark them as provided (for example: servlet-api should probably always be marked as provided if ur deploying to tomcat/jetty). Either way it lists everything the project needs to run and/or compile so if you change stuff in the future you don't have to hunt down the server config to figure out what was provided. Right I know all that, I was specifically referring to the 3mb jar files which are usually the db drivers. Which like you said should be declared as provided dependencies in your POM. IMO DB drivers and logging implementations are the only libs you want to be in your applications servers lib dir because honestly it's easy to get everyone to agree on which version to use and no one is going to be making changes to those anytime soon so you might as well not have them in your war.
|
# ? Sep 25, 2013 20:53 |
|
how do i gui
|
# ? Sep 25, 2013 21:06 |
|
in python? pyqt/pyside
|
# ? Sep 25, 2013 21:08 |
|
Pollyanna posted:how do i gui wpf
|
# ? Sep 25, 2013 21:27 |
|
comedy option: swing
|
# ? Sep 25, 2013 21:28 |
|
Shaggar posted:ahhhh I love spring-mybatis! is so good! i'm gonna try moving my rails project over to mybatis it looks fun
|
# ? Sep 25, 2013 22:09 |
|
please dont gtk
|
# ? Sep 25, 2013 22:10 |
|
i wish i knew why people use gtk it's so loving fiddly and featureless
|
# ? Sep 25, 2013 22:10 |
|
Posting Principle posted:in python? pyqt/pyside i hear either this or wxpython apparently neither are particularly well documented
|
# ? Sep 25, 2013 22:48 |
|
|
# ? May 13, 2024 03:15 |
|
Pollyanna posted:how do i gui very carefully
|
# ? Sep 25, 2013 22:52 |