Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Incubator
    @incube8r
    What we have been doing is keep on training new recruits with GWT. And based on my experience with Errai even a newly graduate student with Java programming knowledge can learn GWT through Errai in a week
    Debasish padhy
    @aino-gautam
    @incube8r as I work with Angular2 and GWT, I can't really agree to the notion that GWT is better / superior then the js libraries out there.. being a Java fanatic having GWT is a bliss but once you try building apps with Angular 2, unfortunately memories of GWT leaves a tricky taste.
    Incubator
    @incube8r
    Errai cuts GWT learning by like 80% for the most part
    Debasish padhy
    @aino-gautam
    for many reasons, primarily because of the difference in speed of UI development
    learning is an additional aspect. Will study Errai and try to come back with some opinion :)
    Incubator
    @incube8r
    Try errai and you will see how it is better with Angular, we were an Angular team in the past. Still IMHO.
    Debasish padhy
    @aino-gautam
    you mean Angular JS ?
    will certainly try out Errai
    Incubator
    @incube8r
    Yeah, To sum it up, the reason I am telling Errai is a better option with Angular is this... Angular is JS based and Errai is Java based. So IMHO Java is better than JS in terms of maintainability, etc. not to mention the coming of Kotlin.
    As what @niloc132 coined Errai before, Errai is a magic framework 👍
    Ahmad K. Bawaneh
    @vegegoku
    @aino-gautam Domino-ui is still a work in progress, eventhough it is excellent for buildiing apps, nothing is preventing you from building a complex or a simple application with it, we are already using it in many projects, and there is also many people who are using it and are very satisfied with the results and and from the feedback they feel productive with it
    Ahmad K. Bawaneh
    @vegegoku
    now about the other parts talking about GWT and JS, i think the JS frameworks are very convenient in many places, and that is most likly for being built as a framework from the start, and they define the workflow and they add limitation on how you go, while in the GWT world it is a toolkit not actually a framework, it is a compiler with a set of tools around it, but people along the way have made frameworks around this toolkit, some are bad some are good, i know how slow development with GWT will be when you do it wrong, but also know how productive you can be if you do it right, the good part is that you can find or build the things you need and works for you the best. there is already a large variation on how GWT is adopted even by the people in this channel, some use it to share code with the server, some combine it with JS some are going all java, and i am from this category..and there is a lot more
    Ahmad K. Bawaneh
    @vegegoku
    for domino we decided to go java all the way and built a set of tools that allows us to be really productive, we have domino-mvp, domino-rest, domino-jackson, domino-ui and a lot more and now we move really fast, maintaining those libs in our free time was possible because we use java. i dont think of GWT or rather java as a lesser or better nor JS as lesser or better, it is just the right person with the right tool for the right job.
    if you wish to learn more about domino-ui please join our channel at https://gitter.im/domino-gwt/domino-ui
    Incubator
    @incube8r
    @vegegoku I totally agree that GWT is more of like a toolkit, and I think you also agree that that's a good thing. For the most part because of that we have Errai, Vaadin, Sencha et.al. So that made me think that GWT is like Linux to the Distros, GWT is the core and distros are the frameworks on top of it.
    @aino-gautam adding to this, you should check out @ibaca 's work, especially the port of RxJava to GWT, not sure if you're a fan of Reactive programming but that's worth a try.
    Harald Pehl
    @hpehl

    @hpehl so it means Circuit is already not maintained?

    @incube8r Not really. The last commit is almost one year old.

    Bellski
    @Bellski
    does isAssignableFrom work as expected ?
    Colin Alworth
    @niloc132
    @Bellski on Class? No, i dont think it is emulated at all - it would require keeping details about all the classes you might be able to reference
    Incubator
    @incube8r
    Hi @niloc132 I'd likee to ask how safe it is to use Java stream in GWT, example Arrays.asList(months).stream().findFirst().get()
    Colin Alworth
    @niloc132
    very safe
    @incube8r i wrote the emulation with some help from my friends (i wrote stream and collector, they worked in spliterator and some of the other features that make it work)
    Incubator
    @incube8r
    Okay cool. It's great that we have this in GWT
    Colin Alworth
    @niloc132
    please note that as in the JVM, it is faster to write a for (int i = 0... loop
    but if you aren't writing code where you are looping through 10k items or something, it probably doesnt matter what you use - and readability of code matters a lot too
    Incubator
    @incube8r
    I see, but the for loop code is quite redundant, and yes, just a couple of list to iterate like 10-20 items for the most part
    btw another question, is there a clean way to get list of days for a given month, where month given is as names, like "January" , etc.
    Colin Alworth
    @niloc132
    LocaleInfo.getCurrentLocale().getDateTimeConstants()...
    a bunch of those names are in there, and will be localized as your current permutation is set
    Incubator
    @incube8r
    Only weekdays are available
    Colin Alworth
    @niloc132
    ?
    shortMonths(), standaloneMonths(), months()?
    for a given month what days are there is asking how many days in a month? or if the first day of a month is a tuesday, wednesday, etc?
    looks like getDateTimeFormatInfo() is preferred to getDateTimeConstants()
    Incubator
    @incube8r
    Days in a month for a dropdown based on selected month
    Colin Alworth
    @niloc132
    well that varies based on the year for feb ;)
    so you should make them pick year too
    check out com.google.gwt.user.datepicker.client.CalendarUtil - take the first day of the month, take the first day of the next month, and ask how many days are between them
    see addMonthsToDate and getDaysBetween on that - but again, you have to build up the Date to start with based on the month and the year to actually get the right answer
    look at how gwt's DatePicker works for some example code of iterating the days of a month
    Incubator
    @incube8r
    Yeah that's the one I've been doing so maybe I will just make a wrapper on this to make it more simple
    Incubator
    @incube8r

    @niloc132 here's what I have come up with:

            Map<String, Integer> daysOfMonthMap = new LinkedHashMap<>();
    
            for(int i=0;i<months.length;i++) {
                String month = months[i];
                int daysInCurrentMonth = new Date(Integer.valueOf(year)-1900, i+1, 0).getDate();
                daysOfMonthMap.put(month, daysInCurrentMonth);
            }

    But apparently Date is already deprecated...

    Colin Alworth
    @niloc132
    @incube8r it is marked deprecated in java itself
    but in JS, the js Date object is almost exactly the java.util.Date object - so we actually encourage using this deprecated class
    notice in CalendarUtils, which does more or less what you are doing, it says that it uses Date, and suppresses deprecation warnings
    Bellski
    @Bellski
    do anyone know how to download file in blob response with Elemental2 ?
    Benjamin DeLillo
    @OneGeek
    Does anyone know of a drop-in/super-sourceable GWT compatible impl of jackson-databind's JsonNode for use with an otherwise GWT compatible library that expects that class?
    Ignacio Baca Moreno-Torres
    @ibaca
    Bellski
    @Bellski
    my ugly :D
        final HTMLAnchorElement a = Js.cast(DomGlobal.document.createElement("a"));
                           a.href = MyGlobal.createObjectURL(blob);
                           a.download = "report.pdf";
    
                           DomGlobal.document.body.appendChild(a);
    
                           a.click();
    
                           DomGlobal.document.body.removeChild(a);
                       });
    Ignacio Baca Moreno-Torres
    @ibaca