GithubHelp home page GithubHelp logo

openliberty / archived-guide-microprofile-intro Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 12.0 267 KB

An introductory guide on how to create a MicroProfile application running on Open Liberty: https://openliberty.io/guides/microprofile-intro.html

License: Other

Java 78.75% HTML 21.25%

archived-guide-microprofile-intro's People

Contributors

ahmad-ayyoub avatar andrewdes avatar chyt avatar evelinec avatar gindik avatar gkwan-ibm avatar guidesbot avatar junyisun avatar justineechen avatar kinueng avatar kubik42 avatar nottycode avatar proubatsis avatar wasdevb1 avatar yeekangc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archived-guide-microprofile-intro's Issues

Test cases are not independent from each other

In the EndPointTest.java, if we comment out one test case such as

@Test
    public void testSuite() {
        this.testEmptyInventory();
        // this.testHostRegistration();
        this.testSystemPropertiesMatch();
        this.testUnknownHost();
    }

Then run mvn clean install again, the following test case will fail.
Although if we run all 4 test cases together, they will all pass.
It means that each test case is not independent, which is an issue.

Rephrase "Congratulations" section

Change the title from Congratulations! You’re done! to Good work! You’re done!

Leave the subsequent text as is, but strip "Congratulations" from it if it appears anywhere.

Missing [source, json] for snippet

The very first json snippet is missing formatting:

 {
    "hosts": {
      "localhost": {
       "os.name": "Mac OS X",
       "user.name": "foo"
     },
     "jon-doe": {
       "os.name": "Windows 10",
       "user.name": "bar"
     }
    },
    "total": 2
  }

It should be labelled with [source, json]

mvn package does not work as it describes

I found that the problem is caused by missing some configuration in the pom.xml file.

             <goals>
                <goal>package-server</goal>
              </goals>
         //this part is missing in pom.xml files for some guides, need to be added
             <configuration>
               <outputDirectory>target/wlp-package</outputDirectory>
             </configuration>
           

Tighten focus and structure of MicroProfile guide

@gcharters and I need to finish re-reviewing this guide to work out how to tighten its focus and structure, which should hopefully shorten it and simplify the structure of headings listed on the left, and also remove duplication with other guides (eg Maven guide).

I've intentionally assigned this to myself but I won't get to it straight away.

Broken links in the readme page

Many links are broken in the readme page. For example:

  • ../guides-common//gitclone.adoc
  • link:finish/src/main/java/io/openliberty/guides/microprofile/InventoryResource.java[] (his is actually meant to be link right?)

If no one is not already working on this, I can take a shot at it. Please let me know.

Refactoring the mp-intro guide

Main problems
Some of the links have not been updated to reflect the code changes. For example, the guide still mentions the endpoint systems which we used in the original draft of the code, but it has been replaced by hosts. There was also a link pointing to inventory/properties which is completely invalid since it doesn't actually serve anything. Some minor issues as well like not being clear what files should be created, explanations in wrong parts, etc.

Other problems
The guide doesn't really flow that well. Each section feels like a new chapter. There are also a lot of unclear sentences that definitely need to be rewritten to get their point across better. The guide is also quite long and can probably be refactored to be less shorter.

Add class to code snippets that aren't code to copy

Currently, any text that is tagged as (effectively) a code snippet is displayed with a 'copy' button that appears on hover in the top right. However, some of the 'code snippets' are actually just console output or are bits of code that the user has already copied but are being called out for more detailed explanation.

I propose tagging console output as class="console" and called out bits of code snippet as class="callout".

Passed requirement to Design to see whether the styles should be any more than just removing the copy button for those classes.

Need MicroProfile and Microservice(s) tags on all microprofile-related guides

Not sure if this Issue goes here or somewhere else... I've communicated this to @yeekangc, but I thought an Issue would be the best way to track the request...

We need to ensure that all of the MicroProfile-related guides are properly tagged with both the MicroProfile and Microservice(s) tag. I don't know whether to use the singular or plural version of Microservice. But, we need potential users to find all of the MicroProfile guides when searching on any of these tags -- microprofile, microservice, and microservices.

Thanks!

Build with tests is failing because Java 9+ has deprecated some javax.* packages

You need to activate that modules (but they will be removed later), or you need to add these new dependencies at least (I prefer this):

<dependency>
  <groupId>javax.xml.bind</groupId>
  <artifactId>jaxb-api</artifactId>
  <version>2.3.0</version>
</dependency>

<dependency>
    <groupId>javax.activation</groupId>
    <artifactId>activation</artifactId>
    <version>1.1.1</version>
</dependency>

'mvn clean install' is failing if you don't skip test.

Uber Jar

How can we create uber jar for openLiberty ? So that it can be run as

java -jar app.jar 

Consider a slightly more explicit style for early instructions in a guide

In these lines:

"First, create the JAX-RS service that serves as the systems endpoint:
src/main/java/io/openliberty/guides/microprofile/InventoryResource.java
[code snippet to paste in]"

Two people misunderstood this step and weren't sure what they were supposed to do to create the JAX-RS service (neither experienced in Java but one was a non-Java developer in the past). I think maybe the first 'copy-and-paste-this-snippet' step needs to be more explicit in each guide. eg:

"First, create the JAX-RS service that serves as the systems endpoint. To do this, create an empty file with this file name and paste the following code into it, then save the file:
src/main/java/io/openliberty/guides/microprofile/InventoryResource.java
[code snippet to paste in]"

If we can get the wording of the first step right (and fix issue #21), I think the rest of the steps will be clear enough.

We should test the new wording before pushing to live.

Need to pre-populate directory structures

I just did the static "Creating a MicroProfile Application" guide in prep for creating a VM image for a Think conference lab. Everything worked out quite well, but I have a couple of observations...

In the Testing Section, we need to highlight that we're dealing with a totally separate directory structure.

First off, I would pre-create the src/test/java/it/io/openliberty/guides/microprofile/ directory structure in the "start" directory. You had pre-created the development (src/main/java/io/openliberty/guides/microprofile/), so do the same for the "it" test directory.

(BTW, that comment should apply to all of the guides. Not just this MicroProfile guide. I just haven't had the chance to test out all the rest yet...)

And, then within this Testing Section, you need to highlight the fact that we are now working in the totally separate "it" directory structure. If you read this too quickly (which I did), you will notice the tiny "it" and assume you are still talking about the development directory structure. And, you get some pretty strange build errors if you put the testing files in the development structure. The maven dependencies don't work right. And, then you try to correct them, and then you get strange compile errors... It's just a mess.

Hope this was clear. Thanks!

Archive MP Intro guide

This MP Intro is now superseded by the combination of the REST Intro and CDI Intro guides.

We should archive this guide. Should check that after it is archived, it won't show up on searches on openliberty.io. Then, direct URL access should still return the guide should it has been bookmarked.

Should have a banner to redirect to new(er) guides too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.